mirror of
https://github.com/swc-project/swc.git
synced 2024-12-20 04:01:39 +03:00
c647cf1bc0
swc_ecma_parser: - fix lexer - better error reporting for jsx reference test swc_ecma_codegen: - Update references
200 lines
8.5 KiB
Plaintext
200 lines
8.5 KiB
Plaintext
Module {
|
|
span: Span {
|
|
lo: BytePos(
|
|
0
|
|
),
|
|
hi: BytePos(
|
|
41
|
|
),
|
|
ctxt: #0
|
|
},
|
|
body: [
|
|
Stmt(
|
|
Expr(
|
|
JSXElement(
|
|
JSXElement {
|
|
span: Span {
|
|
lo: BytePos(
|
|
0
|
|
),
|
|
hi: BytePos(
|
|
41
|
|
),
|
|
ctxt: #0
|
|
},
|
|
opening: JSXOpeningElement {
|
|
name: Ident(
|
|
Ident {
|
|
sym: div,
|
|
span: Span {
|
|
lo: BytePos(
|
|
1
|
|
),
|
|
hi: BytePos(
|
|
4
|
|
),
|
|
ctxt: #0
|
|
},
|
|
type_ann: None,
|
|
optional: false
|
|
}
|
|
),
|
|
span: Span {
|
|
lo: BytePos(
|
|
1
|
|
),
|
|
hi: BytePos(
|
|
12
|
|
),
|
|
ctxt: #0
|
|
},
|
|
attrs: [
|
|
SpreadElement(
|
|
SpreadElement {
|
|
dot3_token: Span {
|
|
lo: BytePos(
|
|
6
|
|
),
|
|
hi: BytePos(
|
|
9
|
|
),
|
|
ctxt: #0
|
|
},
|
|
expr: Ident(
|
|
Ident {
|
|
sym: c,
|
|
span: Span {
|
|
lo: BytePos(
|
|
9
|
|
),
|
|
hi: BytePos(
|
|
10
|
|
),
|
|
ctxt: #0
|
|
},
|
|
type_ann: None,
|
|
optional: false
|
|
}
|
|
)
|
|
}
|
|
)
|
|
],
|
|
self_closing: false,
|
|
type_args: None
|
|
},
|
|
children: [
|
|
JSXText(
|
|
JSXText {
|
|
span: Span {
|
|
lo: BytePos(
|
|
12
|
|
),
|
|
hi: BytePos(
|
|
13
|
|
),
|
|
ctxt: #0
|
|
},
|
|
value: Atom(' ' type=inline),
|
|
raw: Atom(' ' type=inline)
|
|
}
|
|
),
|
|
JSXSpreadChild(
|
|
JSXSpreadChild {
|
|
expr: Ident(
|
|
Ident {
|
|
sym: children,
|
|
span: Span {
|
|
lo: BytePos(
|
|
17
|
|
),
|
|
hi: BytePos(
|
|
25
|
|
),
|
|
ctxt: #0
|
|
},
|
|
type_ann: None,
|
|
optional: false
|
|
}
|
|
)
|
|
}
|
|
),
|
|
JSXExprContainer(
|
|
JSXExprContainer {
|
|
expr: Expr(
|
|
Ident(
|
|
Ident {
|
|
sym: a,
|
|
span: Span {
|
|
lo: BytePos(
|
|
27
|
|
),
|
|
hi: BytePos(
|
|
28
|
|
),
|
|
ctxt: #0
|
|
},
|
|
type_ann: None,
|
|
optional: false
|
|
}
|
|
)
|
|
)
|
|
}
|
|
),
|
|
JSXSpreadChild(
|
|
JSXSpreadChild {
|
|
expr: Ident(
|
|
Ident {
|
|
sym: b,
|
|
span: Span {
|
|
lo: BytePos(
|
|
33
|
|
),
|
|
hi: BytePos(
|
|
34
|
|
),
|
|
ctxt: #0
|
|
},
|
|
type_ann: None,
|
|
optional: false
|
|
}
|
|
)
|
|
}
|
|
)
|
|
],
|
|
closing: Some(
|
|
JSXClosingElement {
|
|
span: Span {
|
|
lo: BytePos(
|
|
37
|
|
),
|
|
hi: BytePos(
|
|
41
|
|
),
|
|
ctxt: #0
|
|
},
|
|
name: Ident(
|
|
Ident {
|
|
sym: div,
|
|
span: Span {
|
|
lo: BytePos(
|
|
37
|
|
),
|
|
hi: BytePos(
|
|
40
|
|
),
|
|
ctxt: #0
|
|
},
|
|
type_ann: None,
|
|
optional: false
|
|
}
|
|
)
|
|
}
|
|
)
|
|
}
|
|
)
|
|
)
|
|
)
|
|
],
|
|
shebang: None
|
|
}
|