Search
Preparing search index...
The search index is not available
@saber2pr/jsx-ast-parser
Options
All
Public
Public/Protected
All
Inherited
Externals
Menu
@saber2pr/jsx-ast-parser
parser
Namespace parser
Index
Enumerations
Token
Kind
Interfaces
Array
Expr
Arrow
Function
Expr
Block
Expr
Call
Chain
Expr
Closing
Tag
Expr
Define
Variable
Statement
Function
Expr
Identity
Expr
If
Statement
Jsx
Expr
Jsx
Inner
Expr
Jsx
Self
Closing
Expr
Keyword
Expr
Node
Number
Expr
Object
Expr
Opening
Tag
Expr
Program
Prop
Expr
Return
Statement
String
Expr
Text
Expr
Variable
Assign
Expr
Type aliases
Expression
Jsx
Parameter
Statement
Token
Variables
ARRAY
ARROWFUNCTION
BLOCK
CALLCHAIN
CLOSETAG
DECLAREVARIABLE
EXPRESSION
FUNCTION
IDENTITY
IFSTATEMENT
JSX
JSXINNEREXPR
JSXOPENED
JSXSELFCLOSE
KEYWORD
NUMBER
OBJ
OPENTAG
PARAMETER
PROGRAM
PROP
RETURNSTATEMENT
STATEMENT
STRING
TEXT
Token
Rules
VARIABLEASSIGN
tokenizer
Functions
apply
Array
apply
Arrow
Function
apply
Block
apply
Call
Chain
apply
Closing
Tag
apply
Define
Variable
apply
Function
apply
Identity
apply
If
apply
Jsx
apply
Jsx
Inner
apply
Jsx
Self
Closing
apply
Keyword
apply
Number
apply
Object
apply
Opening
Tag
apply
Program
apply
Prop
apply
Return
apply
String
apply
Text
apply
Variable
Assign
is
Array
Expr
is
Arrow
Function
Expr
is
Block
Expr
is
Call
Chain
Expr
is
Define
Variable
Statement
is
Expression
is
Function
Expr
is
Identity
Expr
is
IfStatement
is
Jsx
Expr
is
Jsx
Inner
Expr
is
Jsx
Self
Closing
Expr
is
Number
Expr
is
Object
Expr
is
Program
is
Return
Statement
is
Statement
is
String
Expr
is
Text
Expr
is
Variable
Assign
Expr
parse
Type aliases
Expression
Expression
:
Jsx
|
StringExpr
|
NumberExpr
|
ObjectExpr
|
ArrayExpr
|
ArrowFunctionExpr
|
CallChainExpr
|
FunctionExpr
|
VariableAssignExpr
|
BlockExpr
Jsx
Jsx
:
JsxExpr
|
JsxSelfClosingExpr
Parameter
Parameter
:
(
IdentityExpr
|
Expression
)
[]
|
undefined
Statement
Statement
:
CallChainExpr
|
DefineVariableStatement
|
VariableAssignExpr
|
IfStatement
|
ReturnStatement
|
Jsx
|
StringExpr
|
NumberExpr
|
ObjectExpr
|
ArrayExpr
|
ArrowFunctionExpr
|
FunctionExpr
Token
Token
:
parsec.Token
<
TokenKind
>
Variables
Const
ARRAY
ARRAY
:
Rule
<
TokenKind
,
ArrayExpr
>
= ...
Const
ARROWFUNCTION
ARROWFUNCTION
:
Rule
<
TokenKind
,
ArrowFunctionExpr
>
= ...
Const
BLOCK
BLOCK
:
Rule
<
TokenKind
,
BlockExpr
>
= ...
Const
CALLCHAIN
CALLCHAIN
:
Rule
<
TokenKind
,
CallChainExpr
>
= ...
Const
CLOSETAG
CLOSETAG
:
Rule
<
TokenKind
,
ClosingTagExpr
>
= ...
Const
DECLAREVARIABLE
DECLAREVARIABLE
:
Rule
<
TokenKind
,
DefineVariableStatement
>
= ...
Const
EXPRESSION
EXPRESSION
:
Parser
<
TokenKind
,
NumberExpr
|
StringExpr
|
ObjectExpr
|
JsxExpr
|
JsxSelfClosingExpr
|
ArrayExpr
|
ArrowFunctionExpr
|
CallChainExpr
|
FunctionExpr
|
BlockExpr
>
= ...
Const
FUNCTION
FUNCTION
:
Rule
<
TokenKind
,
FunctionExpr
>
= ...
Const
IDENTITY
IDENTITY
:
Rule
<
TokenKind
,
IdentityExpr
>
= ...
Const
IFSTATEMENT
IFSTATEMENT
:
Rule
<
TokenKind
,
IfStatement
>
= ...
Const
JSX
JSX
:
Parser
<
TokenKind
,
JsxSelfClosingExpr
|
JsxExpr
>
= ...
Const
JSXINNEREXPR
JSXINNEREXPR
:
Rule
<
TokenKind
,
JsxInnerExpr
>
= ...
Const
JSXOPENED
JSXOPENED
:
Rule
<
TokenKind
,
JsxExpr
>
= ...
Const
JSXSELFCLOSE
JSXSELFCLOSE
:
Rule
<
TokenKind
,
JsxSelfClosingExpr
>
= ...
Const
KEYWORD
KEYWORD
:
Rule
<
TokenKind
,
KeywordExpr
>
= ...
Const
NUMBER
NUMBER
:
Rule
<
TokenKind
,
NumberExpr
>
= ...
Const
OBJ
OBJ
:
Rule
<
TokenKind
,
ObjectExpr
>
= ...
Const
OPENTAG
OPENTAG
:
Rule
<
TokenKind
,
OpeningTagExpr
>
= ...
Const
PARAMETER
PARAMETER
:
Parser
<
TokenKind
,
(
IdentityExpr
|
Expression
)
[]
|
undefined
>
= ...
Const
PROGRAM
PROGRAM
:
Rule
<
TokenKind
,
Program
>
= ...
Const
PROP
PROP
:
Rule
<
TokenKind
,
PropExpr
>
= ...
Const
RETURNSTATEMENT
RETURNSTATEMENT
:
Rule
<
TokenKind
,
ReturnStatement
>
= ...
Const
STATEMENT
STATEMENT
:
Parser
<
TokenKind
,
NumberExpr
|
StringExpr
|
ObjectExpr
|
JsxExpr
|
JsxSelfClosingExpr
|
ArrayExpr
|
ArrowFunctionExpr
|
CallChainExpr
|
FunctionExpr
|
VariableAssignExpr
|
DefineVariableStatement
|
IfStatement
|
ReturnStatement
>
= ...
Const
STRING
STRING
:
Rule
<
TokenKind
,
StringExpr
>
= ...
Const
TEXT
TEXT
:
Rule
<
TokenKind
,
TextExpr
>
= ...
Const
Token
Rules
Token
Rules
:
[
boolean
,
RegExp
,
TokenKind
]
[]
= ...
Const
VARIABLEASSIGN
VARIABLEASSIGN
:
Rule
<
TokenKind
,
VariableAssignExpr
>
= ...
Const
tokenizer
tokenizer
:
Lexer
<
TokenKind
>
= ...
Functions
apply
Array
apply
Array
(
items
?:
(
Expression
|
IdentityExpr
)
[]
|
undefined
)
:
ArrayExpr
Parameters
items:
(
Expression
|
IdentityExpr
)
[]
|
undefined
= []
Returns
ArrayExpr
apply
Arrow
Function
apply
Arrow
Function
(
source
:
[
Parameter
|
IdentityExpr
,
Expression
]
)
:
ArrowFunctionExpr
Parameters
source:
[
Parameter
|
IdentityExpr
,
Expression
]
Returns
ArrowFunctionExpr
apply
Block
apply
Block
(
body
?:
Statement
[]
)
:
BlockExpr
Parameters
body:
Statement
[]
= []
Returns
BlockExpr
apply
Call
Chain
apply
Call
Chain
(
source
:
[
IdentityExpr
[]
,
Parameter
]
)
:
CallChainExpr
Parameters
source:
[
IdentityExpr
[]
,
Parameter
]
Returns
CallChainExpr
apply
Closing
Tag
apply
Closing
Tag
(
source
:
IdentityExpr
)
:
ClosingTagExpr
Parameters
source:
IdentityExpr
Returns
ClosingTagExpr
apply
Define
Variable
apply
Define
Variable
(
source
:
[
KeywordExpr
,
VariableAssignExpr
|
IdentityExpr
]
)
:
DefineVariableStatement
Parameters
source:
[
KeywordExpr
,
VariableAssignExpr
|
IdentityExpr
]
Returns
DefineVariableStatement
apply
Function
apply
Function
(
source
:
[
IdentityExpr
|
undefined
,
Parameter
,
BlockExpr
]
)
:
FunctionExpr
Parameters
source:
[
IdentityExpr
|
undefined
,
Parameter
,
BlockExpr
]
Returns
FunctionExpr
apply
Identity
apply
Identity
(
source
:
[
Token
,
[
NumberExpr
,
TextExpr
]
|
undefined
]
)
:
IdentityExpr
Parameters
source:
[
Token
,
[
NumberExpr
,
TextExpr
]
|
undefined
]
Returns
IdentityExpr
apply
If
apply
If
(
source
:
[
IfStatement
[
"args"
]
,
IfStatement
[
"body"
]
,
IfStatement
[
"els"
]
]
)
:
IfStatement
Parameters
source:
[
IfStatement
[
"args"
]
,
IfStatement
[
"body"
]
,
IfStatement
[
"els"
]
]
Returns
IfStatement
apply
Jsx
apply
Jsx
(
source
:
[
OpeningTagExpr
,
JsxExpr
[
"body"
]
,
ClosingTagExpr
]
)
:
JsxExpr
Parameters
source:
[
OpeningTagExpr
,
JsxExpr
[
"body"
]
,
ClosingTagExpr
]
Returns
JsxExpr
apply
Jsx
Inner
apply
Jsx
Inner
(
source
:
Expression
|
IdentityExpr
)
:
JsxInnerExpr
Parameters
source:
Expression
|
IdentityExpr
Returns
JsxInnerExpr
apply
Jsx
Self
Closing
apply
Jsx
Self
Closing
(
source
:
[
IdentityExpr
,
PropExpr
[]
]
)
:
JsxSelfClosingExpr
Parameters
source:
[
IdentityExpr
,
PropExpr
[]
]
Returns
JsxSelfClosingExpr
apply
Keyword
apply
Keyword
(
token
:
Token
)
:
KeywordExpr
Parameters
token:
Token
Returns
KeywordExpr
apply
Number
apply
Number
(
token
:
Token
)
:
NumberExpr
Parameters
token:
Token
Returns
NumberExpr
apply
Object
apply
Object
(
source
?:
[
IdentityExpr
,
Token
,
Expression
|
IdentityExpr
]
[]
|
undefined
)
:
ObjectExpr
Parameters
source:
[
IdentityExpr
,
Token
,
Expression
|
IdentityExpr
]
[]
|
undefined
= []
Returns
ObjectExpr
apply
Opening
Tag
apply
Opening
Tag
(
source
:
[
IdentityExpr
,
PropExpr
[]
]
)
:
OpeningTagExpr
Parameters
source:
[
IdentityExpr
,
PropExpr
[]
]
Returns
OpeningTagExpr
apply
Program
apply
Program
(
value
:
Program
[
"body"
]
)
:
Program
Parameters
value:
Program
[
"body"
]
Returns
Program
apply
Prop
apply
Prop
(
source
:
[
IdentityExpr
,
PropExpr
[
"value"
]
]
|
[
IdentityExpr
,
undefined
]
)
:
PropExpr
Parameters
source:
[
IdentityExpr
,
PropExpr
[
"value"
]
]
|
[
IdentityExpr
,
undefined
]
Returns
PropExpr
apply
Return
apply
Return
(
source
:
Expression
)
:
ReturnStatement
Parameters
source:
Expression
Returns
ReturnStatement
apply
String
apply
String
(
text
:
TextExpr
)
:
StringExpr
Parameters
text:
TextExpr
Returns
StringExpr
apply
Text
apply
Text
(
source
:
Token
[]
)
:
TextExpr
Parameters
source:
Token
[]
Returns
TextExpr
apply
Variable
Assign
apply
Variable
Assign
(
source
:
[
IdentityExpr
,
Expression
|
undefined
]
)
:
VariableAssignExpr
Parameters
source:
[
IdentityExpr
,
Expression
|
undefined
]
Returns
VariableAssignExpr
is
Array
Expr
is
Array
Expr
(
token
:
Node
)
:
token
is
ArrayExpr
Parameters
token:
Node
Returns
token
is
ArrayExpr
is
Arrow
Function
Expr
is
Arrow
Function
Expr
(
token
:
Node
)
:
token
is
ArrowFunctionExpr
Parameters
token:
Node
Returns
token
is
ArrowFunctionExpr
is
Block
Expr
is
Block
Expr
(
token
:
Node
)
:
token
is
BlockExpr
Parameters
token:
Node
Returns
token
is
BlockExpr
is
Call
Chain
Expr
is
Call
Chain
Expr
(
token
:
Node
)
:
token
is
CallChainExpr
Parameters
token:
Node
Returns
token
is
CallChainExpr
is
Define
Variable
Statement
is
Define
Variable
Statement
(
token
:
Node
)
:
token
is
DefineVariableStatement
Parameters
token:
Node
Returns
token
is
DefineVariableStatement
is
Expression
is
Expression
(
token
:
Node
)
:
token
is
Expression
Parameters
token:
Node
Returns
token
is
Expression
is
Function
Expr
is
Function
Expr
(
token
:
Node
)
:
token
is
FunctionExpr
Parameters
token:
Node
Returns
token
is
FunctionExpr
is
Identity
Expr
is
Identity
Expr
(
token
:
Node
)
:
token
is
IdentityExpr
Parameters
token:
Node
Returns
token
is
IdentityExpr
is
IfStatement
is
IfStatement
(
token
:
Node
)
:
token
is
IfStatement
Parameters
token:
Node
Returns
token
is
IfStatement
is
Jsx
Expr
is
Jsx
Expr
(
token
:
Node
)
:
token
is
JsxExpr
Parameters
token:
Node
Returns
token
is
JsxExpr
is
Jsx
Inner
Expr
is
Jsx
Inner
Expr
(
token
:
Node
)
:
token
is
JsxInnerExpr
Parameters
token:
Node
Returns
token
is
JsxInnerExpr
is
Jsx
Self
Closing
Expr
is
Jsx
Self
Closing
Expr
(
token
:
Node
)
:
token
is
JsxSelfClosingExpr
Parameters
token:
Node
Returns
token
is
JsxSelfClosingExpr
is
Number
Expr
is
Number
Expr
(
token
:
Node
)
:
token
is
NumberExpr
Parameters
token:
Node
Returns
token
is
NumberExpr
is
Object
Expr
is
Object
Expr
(
token
:
Node
)
:
token
is
ObjectExpr
Parameters
token:
Node
Returns
token
is
ObjectExpr
is
Program
is
Program
(
token
:
Node
)
:
token
is
Program
Parameters
token:
Node
Returns
token
is
Program
is
Return
Statement
is
Return
Statement
(
token
:
Node
)
:
token
is
ReturnStatement
Parameters
token:
Node
Returns
token
is
ReturnStatement
is
Statement
is
Statement
(
token
:
Node
)
:
token
is
Statement
Parameters
token:
Node
Returns
token
is
Statement
is
String
Expr
is
String
Expr
(
token
:
Node
)
:
token
is
StringExpr
Parameters
token:
Node
Returns
token
is
StringExpr
is
Text
Expr
is
Text
Expr
(
token
:
Node
)
:
token
is
TextExpr
Parameters
token:
Node
Returns
token
is
TextExpr
is
Variable
Assign
Expr
is
Variable
Assign
Expr
(
token
:
Node
)
:
token
is
VariableAssignExpr
Parameters
token:
Node
Returns
token
is
VariableAssignExpr
parse
parse
(
code
:
string
)
:
Program
Parameters
code:
string
Returns
Program
Exports
compiler
parser
transformer
traverser
Token
Kind
Array
Expr
Arrow
Function
Expr
Block
Expr
Call
Chain
Expr
Closing
Tag
Expr
Define
Variable
Statement
Function
Expr
Identity
Expr
If
Statement
Jsx
Expr
Jsx
Inner
Expr
Jsx
Self
Closing
Expr
Keyword
Expr
Node
Number
Expr
Object
Expr
Opening
Tag
Expr
Program
Prop
Expr
Return
Statement
String
Expr
Text
Expr
Variable
Assign
Expr
Expression
Jsx
Parameter
Statement
Token
ARRAY
ARROWFUNCTION
BLOCK
CALLCHAIN
CLOSETAG
DECLAREVARIABLE
EXPRESSION
FUNCTION
IDENTITY
IFSTATEMENT
JSX
JSXINNEREXPR
JSXOPENED
JSXSELFCLOSE
KEYWORD
NUMBER
OBJ
OPENTAG
PARAMETER
PROGRAM
PROP
RETURNSTATEMENT
STATEMENT
STRING
TEXT
Token
Rules
VARIABLEASSIGN
tokenizer
apply
Array
apply
Arrow
Function
apply
Block
apply
Call
Chain
apply
Closing
Tag
apply
Define
Variable
apply
Function
apply
Identity
apply
If
apply
Jsx
apply
Jsx
Inner
apply
Jsx
Self
Closing
apply
Keyword
apply
Number
apply
Object
apply
Opening
Tag
apply
Program
apply
Prop
apply
Return
apply
String
apply
Text
apply
Variable
Assign
is
Array
Expr
is
Arrow
Function
Expr
is
Block
Expr
is
Call
Chain
Expr
is
Define
Variable
Statement
is
Expression
is
Function
Expr
is
Identity
Expr
is
IfStatement
is
Jsx
Expr
is
Jsx
Inner
Expr
is
Jsx
Self
Closing
Expr
is
Number
Expr
is
Object
Expr
is
Program
is
Return
Statement
is
Statement
is
String
Expr
is
Text
Expr
is
Variable
Assign
Expr
parse
Generated using
TypeDoc