mirror of
https://github.com/swc-project/swc.git
synced 2024-12-25 22:56:11 +03:00
603b83291d
swc_ecma_parser: - implement parser for jsx swc_ecma_transforms: - implement react::jsx transform swc_ecma_codegen: - implement code generator for jsx
102 lines
3.6 KiB
Plaintext
102 lines
3.6 KiB
Plaintext
Module {
|
|
span: Span {
|
|
lo: BytePos(
|
|
0
|
|
),
|
|
hi: BytePos(
|
|
16
|
|
),
|
|
ctxt: #0
|
|
},
|
|
body: [
|
|
Stmt(
|
|
Expr(
|
|
JSXElement(
|
|
JSXElement {
|
|
span: Span {
|
|
lo: BytePos(
|
|
0
|
|
),
|
|
hi: BytePos(
|
|
16
|
|
),
|
|
ctxt: #0
|
|
},
|
|
opening: JSXOpeningElement {
|
|
name: Ident(
|
|
Ident(
|
|
A,
|
|
Span {
|
|
lo: BytePos(
|
|
1
|
|
),
|
|
hi: BytePos(
|
|
2
|
|
),
|
|
ctxt: #0
|
|
}
|
|
)
|
|
),
|
|
span: Span {
|
|
lo: BytePos(
|
|
1
|
|
),
|
|
hi: BytePos(
|
|
3
|
|
),
|
|
ctxt: #0
|
|
},
|
|
attrs: [],
|
|
self_closing: false
|
|
},
|
|
children: [
|
|
JSXText(
|
|
JSXText {
|
|
span: Span {
|
|
lo: BytePos(
|
|
3
|
|
),
|
|
hi: BytePos(
|
|
12
|
|
),
|
|
ctxt: #0
|
|
},
|
|
value: Atom('g4q9;' type=dynamic),
|
|
raw: Atom('g4q9;' type=dynamic)
|
|
}
|
|
)
|
|
],
|
|
closing: Some(
|
|
JSXClosingElement {
|
|
span: Span {
|
|
lo: BytePos(
|
|
14
|
|
),
|
|
hi: BytePos(
|
|
16
|
|
),
|
|
ctxt: #0
|
|
},
|
|
name: Ident(
|
|
Ident(
|
|
A,
|
|
Span {
|
|
lo: BytePos(
|
|
14
|
|
),
|
|
hi: BytePos(
|
|
15
|
|
),
|
|
ctxt: #0
|
|
}
|
|
)
|
|
)
|
|
}
|
|
)
|
|
}
|
|
)
|
|
)
|
|
)
|
|
]
|
|
}
|