mirror of
https://github.com/swc-project/swc.git
synced 2024-12-30 00:52:29 +03:00
c647cf1bc0
swc_ecma_parser: - fix lexer - better error reporting for jsx reference test swc_ecma_codegen: - Update references
299 lines
14 KiB
Plaintext
299 lines
14 KiB
Plaintext
Module {
|
|
span: Span {
|
|
lo: BytePos(
|
|
0
|
|
),
|
|
hi: BytePos(
|
|
50
|
|
),
|
|
ctxt: #0
|
|
},
|
|
body: [
|
|
Stmt(
|
|
Expr(
|
|
JSXFragment(
|
|
JSXFragment {
|
|
span: Span {
|
|
lo: BytePos(
|
|
0
|
|
),
|
|
hi: BytePos(
|
|
50
|
|
),
|
|
ctxt: #0
|
|
},
|
|
opening: JSXOpeningFragment {
|
|
span: Span {
|
|
lo: BytePos(
|
|
2
|
|
),
|
|
hi: BytePos(
|
|
3
|
|
),
|
|
ctxt: #0
|
|
}
|
|
},
|
|
children: [
|
|
JSXText(
|
|
JSXText {
|
|
span: Span {
|
|
lo: BytePos(
|
|
3
|
|
),
|
|
hi: BytePos(
|
|
6
|
|
),
|
|
ctxt: #0
|
|
},
|
|
value: Atom('
|
|
|
|
' type=inline),
|
|
raw: Atom('
|
|
|
|
' type=inline)
|
|
}
|
|
),
|
|
JSXElement(
|
|
JSXElement {
|
|
span: Span {
|
|
lo: BytePos(
|
|
6
|
|
),
|
|
hi: BytePos(
|
|
29
|
|
),
|
|
ctxt: #0
|
|
},
|
|
opening: JSXOpeningElement {
|
|
name: Ident(
|
|
Ident {
|
|
sym: span,
|
|
span: Span {
|
|
lo: BytePos(
|
|
7
|
|
),
|
|
hi: BytePos(
|
|
11
|
|
),
|
|
ctxt: #0
|
|
},
|
|
type_ann: None,
|
|
optional: false
|
|
}
|
|
),
|
|
span: Span {
|
|
lo: BytePos(
|
|
7
|
|
),
|
|
hi: BytePos(
|
|
12
|
|
),
|
|
ctxt: #0
|
|
},
|
|
attrs: [],
|
|
self_closing: false,
|
|
type_args: None
|
|
},
|
|
children: [
|
|
JSXText(
|
|
JSXText {
|
|
span: Span {
|
|
lo: BytePos(
|
|
12
|
|
),
|
|
hi: BytePos(
|
|
22
|
|
),
|
|
ctxt: #0
|
|
},
|
|
value: Atom('
|
|
|
|
hi
|
|
|
|
' type=dynamic),
|
|
raw: Atom('
|
|
|
|
hi
|
|
|
|
' type=dynamic)
|
|
}
|
|
)
|
|
],
|
|
closing: Some(
|
|
JSXClosingElement {
|
|
span: Span {
|
|
lo: BytePos(
|
|
24
|
|
),
|
|
hi: BytePos(
|
|
29
|
|
),
|
|
ctxt: #0
|
|
},
|
|
name: Ident(
|
|
Ident {
|
|
sym: span,
|
|
span: Span {
|
|
lo: BytePos(
|
|
24
|
|
),
|
|
hi: BytePos(
|
|
28
|
|
),
|
|
ctxt: #0
|
|
},
|
|
type_ann: None,
|
|
optional: false
|
|
}
|
|
)
|
|
}
|
|
)
|
|
}
|
|
),
|
|
JSXText(
|
|
JSXText {
|
|
span: Span {
|
|
lo: BytePos(
|
|
29
|
|
),
|
|
hi: BytePos(
|
|
32
|
|
),
|
|
ctxt: #0
|
|
},
|
|
value: Atom('
|
|
|
|
' type=inline),
|
|
raw: Atom('
|
|
|
|
' type=inline)
|
|
}
|
|
),
|
|
JSXElement(
|
|
JSXElement {
|
|
span: Span {
|
|
lo: BytePos(
|
|
32
|
|
),
|
|
hi: BytePos(
|
|
46
|
|
),
|
|
ctxt: #0
|
|
},
|
|
opening: JSXOpeningElement {
|
|
name: Ident(
|
|
Ident {
|
|
sym: div,
|
|
span: Span {
|
|
lo: BytePos(
|
|
33
|
|
),
|
|
hi: BytePos(
|
|
36
|
|
),
|
|
ctxt: #0
|
|
},
|
|
type_ann: None,
|
|
optional: false
|
|
}
|
|
),
|
|
span: Span {
|
|
lo: BytePos(
|
|
33
|
|
),
|
|
hi: BytePos(
|
|
37
|
|
),
|
|
ctxt: #0
|
|
},
|
|
attrs: [],
|
|
self_closing: false,
|
|
type_args: None
|
|
},
|
|
children: [
|
|
JSXText(
|
|
JSXText {
|
|
span: Span {
|
|
lo: BytePos(
|
|
37
|
|
),
|
|
hi: BytePos(
|
|
40
|
|
),
|
|
ctxt: #0
|
|
},
|
|
value: Atom('bye' type=inline),
|
|
raw: Atom('bye' type=inline)
|
|
}
|
|
)
|
|
],
|
|
closing: Some(
|
|
JSXClosingElement {
|
|
span: Span {
|
|
lo: BytePos(
|
|
42
|
|
),
|
|
hi: BytePos(
|
|
46
|
|
),
|
|
ctxt: #0
|
|
},
|
|
name: Ident(
|
|
Ident {
|
|
sym: div,
|
|
span: Span {
|
|
lo: BytePos(
|
|
42
|
|
),
|
|
hi: BytePos(
|
|
45
|
|
),
|
|
ctxt: #0
|
|
},
|
|
type_ann: None,
|
|
optional: false
|
|
}
|
|
)
|
|
}
|
|
)
|
|
}
|
|
),
|
|
JSXText(
|
|
JSXText {
|
|
span: Span {
|
|
lo: BytePos(
|
|
46
|
|
),
|
|
hi: BytePos(
|
|
47
|
|
),
|
|
ctxt: #0
|
|
},
|
|
value: Atom('
|
|
|
|
' type=inline),
|
|
raw: Atom('
|
|
|
|
' type=inline)
|
|
}
|
|
)
|
|
],
|
|
closing: JSXClosingFragment {
|
|
span: Span {
|
|
lo: BytePos(
|
|
49
|
|
),
|
|
hi: BytePos(
|
|
50
|
|
),
|
|
ctxt: #0
|
|
}
|
|
}
|
|
}
|
|
)
|
|
)
|
|
)
|
|
],
|
|
shebang: None
|
|
}
|