Crate swc_ecma_ast
source ·Macros
- Creates a corresponding operator. This macro is used to make code more readable.
Structs
- An archived
Invalid
- Array literal.
{key}
or{key = value}
- Identifier used as a pattern.
- Use when only block statements are allowed.
- A boolean literal.
- Class expression.
export * from 'mod'
export * as foo from 'src';
- Function expression.
- Common parts of function and method.
- A complete identifier with span.
- e.g.
import foo from 'mod.js'
- e.g. local = foo, imported = None
import { foo } from 'mod.js'
e.g. local = bar, imported = Some(foo) forimport { foo as bar } from 'mod.js'
- e.g.
import * as foo from 'mod.js'
. - Represents a invalid node.
- The resolver for an archived
Invalid
- XML-based namespace syntax:
{key: value}
- Represents the formatting rule for a list of nodes.
export { foo } from 'mod'
export { foo as bar } from 'mod'
- A numeric literal.
- Object literal.
- EsTree
RestElement
- A string literal.
- TypeScript’s own parser uses ExportAssignment for both
export default
andexport =
. But for @babel/parser,export default
is an ExportDefaultDecl, so a TsExportAssignment is alwaysexport =
. typeof
operator
Enums
- Note: This type implements
Serailize
andDeserialize
ifserde
is enabled, instead of requiringserde-impl
feature. - A head for for-in and for-of loop.
- Used for
obj
property ofJSXMemberExpr
. - Either a private name or a public name.
- Invalid: Ident with empty symbol.
namespace A.B { }
is a namespace namedA
with another TsNamespaceDecl as its body.
Traits
Type Aliases
- See Ident for documentation.