swc/ecmascript/parser/tests/jsx/basic/8/input.js.stdout
강동윤 603b83291d
jsx support (#100)
swc_ecma_parser:
 - implement parser for jsx

swc_ecma_transforms:
 - implement react::jsx transform

swc_ecma_codegen:
 - implement code generator for jsx
2018-12-30 11:57:27 +09:00

201 lines
11 KiB
Plaintext

Module {
span: Span {
lo: BytePos(
0
),
hi: BytePos(
27
),
ctxt: #0
},
body: [
Stmt(
Expr(
JSXElement(
JSXElement {
span: Span {
lo: BytePos(
0
),
hi: BytePos(
27
),
ctxt: #0
},
opening: JSXOpeningElement {
name: Ident(
Ident(
a,
Span {
lo: BytePos(
1
),
hi: BytePos(
2
),
ctxt: #0
}
)
),
span: Span {
lo: BytePos(
1
),
hi: BytePos(
27
),
ctxt: #0
},
attrs: [
JSXAttr(
JSXAttr {
span: Span {
lo: BytePos(
3
),
hi: BytePos(
24
),
ctxt: #0
},
name: Ident(
Ident(
b,
Span {
lo: BytePos(
3
),
hi: BytePos(
4
),
ctxt: #0
}
)
),
value: Some(
Cond(
CondExpr {
span: Span {
lo: BytePos(
6
),
hi: BytePos(
23
),
ctxt: #0
},
test: Ident(
Ident(
x,
Span {
lo: BytePos(
6
),
hi: BytePos(
7
),
ctxt: #0
}
)
),
cons: JSXElement(
JSXElement {
span: Span {
lo: BytePos(
10
),
hi: BytePos(
15
),
ctxt: #0
},
opening: JSXOpeningElement {
name: Ident(
Ident(
c,
Span {
lo: BytePos(
11
),
hi: BytePos(
12
),
ctxt: #0
}
)
),
span: Span {
lo: BytePos(
11
),
hi: BytePos(
15
),
ctxt: #0
},
attrs: [],
self_closing: true
},
children: [],
closing: None
}
),
alt: JSXElement(
JSXElement {
span: Span {
lo: BytePos(
18
),
hi: BytePos(
23
),
ctxt: #0
},
opening: JSXOpeningElement {
name: Ident(
Ident(
d,
Span {
lo: BytePos(
19
),
hi: BytePos(
20
),
ctxt: #0
}
)
),
span: Span {
lo: BytePos(
19
),
hi: BytePos(
23
),
ctxt: #0
},
attrs: [],
self_closing: true
},
children: [],
closing: None
}
)
}
)
)
}
)
],
self_closing: true
},
children: [],
closing: None
}
)
)
)
]
}