mirror of
https://github.com/swc-project/swc.git
synced 2024-12-21 04:32:01 +03:00
ea610c6ded
swc_atoms: - add some atoms swc_ecma_ast: - ast nodes for typescript - `ClassMethod` -> `Method`, `ClassMethodKind` -> `MethodKind` - private class method / class property - use separate type for tagged template literals - add `declare` field to `Decl`s - make function body optional swc_ecma_parser: - rename Type to TokenContext - support decorators Note: error reporting for invalid decorator is not implemented yet - merge `Config` into `Syntax` - Use DiagnosticBuilder for error type This is to make backtracking cheaper. swc_ecma_transforms: - add `strip` pass
107 lines
3.9 KiB
Plaintext
107 lines
3.9 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 {
|
|
sym: A,
|
|
span: Span {
|
|
lo: BytePos(
|
|
1
|
|
),
|
|
hi: BytePos(
|
|
2
|
|
),
|
|
ctxt: #0
|
|
},
|
|
type_ann: None,
|
|
optional: false
|
|
}
|
|
),
|
|
span: Span {
|
|
lo: BytePos(
|
|
1
|
|
),
|
|
hi: BytePos(
|
|
3
|
|
),
|
|
ctxt: #0
|
|
},
|
|
attrs: [],
|
|
self_closing: false,
|
|
type_args: None
|
|
},
|
|
children: [
|
|
JSXText(
|
|
JSXText {
|
|
span: Span {
|
|
lo: BytePos(
|
|
3
|
|
),
|
|
hi: BytePos(
|
|
12
|
|
),
|
|
ctxt: #0
|
|
},
|
|
value: Atom('💩' type=inline),
|
|
raw: Atom('💩' type=inline)
|
|
}
|
|
)
|
|
],
|
|
closing: Some(
|
|
JSXClosingElement {
|
|
span: Span {
|
|
lo: BytePos(
|
|
14
|
|
),
|
|
hi: BytePos(
|
|
16
|
|
),
|
|
ctxt: #0
|
|
},
|
|
name: Ident(
|
|
Ident {
|
|
sym: A,
|
|
span: Span {
|
|
lo: BytePos(
|
|
14
|
|
),
|
|
hi: BytePos(
|
|
15
|
|
),
|
|
ctxt: #0
|
|
},
|
|
type_ann: None,
|
|
optional: false
|
|
}
|
|
)
|
|
}
|
|
)
|
|
}
|
|
)
|
|
)
|
|
)
|
|
]
|
|
}
|