swc/ecmascript/parser/tests/jsx/basic/3/input.js.stdout
강동윤 c647cf1bc0
Fix bugs (#193)
swc_ecma_parser:
 - fix lexer
 - better error reporting for jsx reference test

swc_ecma_codegen:
 - Update references
2019-02-13 16:03:38 +09:00

329 lines
16 KiB
Plaintext

Module {
span: Span {
lo: BytePos(
0
),
hi: BytePos(
40
),
ctxt: #0
},
body: [
Stmt(
Expr(
JSXElement(
JSXElement {
span: Span {
lo: BytePos(
0
),
hi: BytePos(
40
),
ctxt: #0
},
opening: JSXOpeningElement {
name: Ident(
Ident {
sym: a,
span: Span {
lo: BytePos(
1
),
hi: BytePos(
2
),
ctxt: #0
},
type_ann: None,
optional: false
}
),
span: Span {
lo: BytePos(
1
),
hi: BytePos(
15
),
ctxt: #0
},
attrs: [
JSXAttr(
JSXAttr {
span: Span {
lo: BytePos(
3
),
hi: BytePos(
14
),
ctxt: #0
},
name: JSXNamespacedName(
JSXNamespacedName {
ns: Ident {
sym: n,
span: Span {
lo: BytePos(
3
),
hi: BytePos(
4
),
ctxt: #0
},
type_ann: None,
optional: false
},
name: Ident {
sym: foo,
span: Span {
lo: BytePos(
5
),
hi: BytePos(
8
),
ctxt: #0
},
type_ann: None,
optional: false
}
}
),
value: Some(
Lit(
Str(
Str {
span: Span {
lo: BytePos(
9
),
hi: BytePos(
14
),
ctxt: #0
},
value: Atom('bar' type=inline),
has_escape: false
}
)
)
)
}
)
],
self_closing: false,
type_args: None
},
children: [
JSXText(
JSXText {
span: Span {
lo: BytePos(
15
),
hi: BytePos(
16
),
ctxt: #0
},
value: Atom(' ' type=inline),
raw: Atom(' ' type=inline)
}
),
JSXExprContainer(
JSXExprContainer {
expr: Expr(
Ident(
Ident {
sym: value,
span: Span {
lo: BytePos(
17
),
hi: BytePos(
22
),
ctxt: #0
},
type_ann: None,
optional: false
}
)
)
}
),
JSXText(
JSXText {
span: Span {
lo: BytePos(
23
),
hi: BytePos(
24
),
ctxt: #0
},
value: Atom(' ' type=inline),
raw: Atom(' ' type=inline)
}
),
JSXElement(
JSXElement {
span: Span {
lo: BytePos(
24
),
hi: BytePos(
36
),
ctxt: #0
},
opening: JSXOpeningElement {
name: Ident(
Ident {
sym: b,
span: Span {
lo: BytePos(
25
),
hi: BytePos(
26
),
ctxt: #0
},
type_ann: None,
optional: false
}
),
span: Span {
lo: BytePos(
25
),
hi: BytePos(
27
),
ctxt: #0
},
attrs: [],
self_closing: false,
type_args: None
},
children: [
JSXElement(
JSXElement {
span: Span {
lo: BytePos(
27
),
hi: BytePos(
32
),
ctxt: #0
},
opening: JSXOpeningElement {
name: Ident(
Ident {
sym: c,
span: Span {
lo: BytePos(
28
),
hi: BytePos(
29
),
ctxt: #0
},
type_ann: None,
optional: false
}
),
span: Span {
lo: BytePos(
28
),
hi: BytePos(
32
),
ctxt: #0
},
attrs: [],
self_closing: true,
type_args: None
},
children: [],
closing: None
}
)
],
closing: Some(
JSXClosingElement {
span: Span {
lo: BytePos(
34
),
hi: BytePos(
36
),
ctxt: #0
},
name: Ident(
Ident {
sym: b,
span: Span {
lo: BytePos(
34
),
hi: BytePos(
35
),
ctxt: #0
},
type_ann: None,
optional: false
}
)
}
)
}
)
],
closing: Some(
JSXClosingElement {
span: Span {
lo: BytePos(
38
),
hi: BytePos(
40
),
ctxt: #0
},
name: Ident(
Ident {
sym: a,
span: Span {
lo: BytePos(
38
),
hi: BytePos(
39
),
ctxt: #0
},
type_ann: None,
optional: false
}
)
}
)
}
)
)
)
],
shebang: None
}