mirror of
https://github.com/swc-project/swc.git
synced 2025-01-06 13:46:39 +03:00
c647cf1bc0
swc_ecma_parser: - fix lexer - better error reporting for jsx reference test swc_ecma_codegen: - Update references
165 lines
8.4 KiB
Plaintext
165 lines
8.4 KiB
Plaintext
Module {
|
|
span: Span {
|
|
lo: BytePos(
|
|
0
|
|
),
|
|
hi: BytePos(
|
|
34
|
|
),
|
|
ctxt: #0
|
|
},
|
|
body: [
|
|
Stmt(
|
|
Decl(
|
|
Fn(
|
|
FnDecl {
|
|
ident: Ident {
|
|
sym: x,
|
|
span: Span {
|
|
lo: BytePos(
|
|
9
|
|
),
|
|
hi: BytePos(
|
|
10
|
|
),
|
|
ctxt: #0
|
|
},
|
|
type_ann: None,
|
|
optional: false
|
|
},
|
|
declare: false,
|
|
function: Function {
|
|
params: [],
|
|
decorators: [],
|
|
span: Span {
|
|
lo: BytePos(
|
|
0
|
|
),
|
|
hi: BytePos(
|
|
34
|
|
),
|
|
ctxt: #0
|
|
},
|
|
body: Some(
|
|
BlockStmt {
|
|
span: Span {
|
|
lo: BytePos(
|
|
13
|
|
),
|
|
hi: BytePos(
|
|
34
|
|
),
|
|
ctxt: #0
|
|
},
|
|
stmts: [
|
|
Decl(
|
|
Var(
|
|
VarDecl {
|
|
span: Span {
|
|
lo: BytePos(
|
|
17
|
|
),
|
|
hi: BytePos(
|
|
22
|
|
),
|
|
ctxt: #0
|
|
},
|
|
kind: "let",
|
|
declare: false,
|
|
decls: [
|
|
VarDeclarator {
|
|
span: Span {
|
|
lo: BytePos(
|
|
21
|
|
),
|
|
hi: BytePos(
|
|
22
|
|
),
|
|
ctxt: #0
|
|
},
|
|
name: Ident(
|
|
Ident {
|
|
sym: x,
|
|
span: Span {
|
|
lo: BytePos(
|
|
21
|
|
),
|
|
hi: BytePos(
|
|
22
|
|
),
|
|
ctxt: #0
|
|
},
|
|
type_ann: None,
|
|
optional: false
|
|
}
|
|
),
|
|
init: None,
|
|
definite: false
|
|
}
|
|
]
|
|
}
|
|
)
|
|
),
|
|
Expr(
|
|
JSXElement(
|
|
JSXElement {
|
|
span: Span {
|
|
lo: BytePos(
|
|
25
|
|
),
|
|
hi: BytePos(
|
|
32
|
|
),
|
|
ctxt: #0
|
|
},
|
|
opening: JSXOpeningElement {
|
|
name: Ident(
|
|
Ident {
|
|
sym: div,
|
|
span: Span {
|
|
lo: BytePos(
|
|
26
|
|
),
|
|
hi: BytePos(
|
|
29
|
|
),
|
|
ctxt: #0
|
|
},
|
|
type_ann: None,
|
|
optional: false
|
|
}
|
|
),
|
|
span: Span {
|
|
lo: BytePos(
|
|
26
|
|
),
|
|
hi: BytePos(
|
|
32
|
|
),
|
|
ctxt: #0
|
|
},
|
|
attrs: [],
|
|
self_closing: true,
|
|
type_args: None
|
|
},
|
|
children: [],
|
|
closing: None
|
|
}
|
|
)
|
|
)
|
|
]
|
|
}
|
|
),
|
|
is_generator: false,
|
|
is_async: false,
|
|
type_params: None,
|
|
return_type: None
|
|
}
|
|
}
|
|
)
|
|
)
|
|
)
|
|
],
|
|
shebang: None
|
|
}
|