Skip to content

Commit

Permalink
post-merge cleanup
Browse files Browse the repository at this point in the history
  • Loading branch information
ef4 committed Mar 2, 2024
1 parent 2a6af59 commit e2dd8ce
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 132 deletions.
8 changes: 0 additions & 8 deletions crates/swc_ecma_ast/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -19,14 +19,6 @@ pub use self::{
Decorator, Key, MethodKind, PrivateMethod, PrivateProp, StaticBlock,
},
decl::{ClassDecl, Decl, FnDecl, UsingDecl, VarDecl, VarDeclKind, VarDeclarator},
expr::{
ArrayLit, ArrowExpr, AssignExpr, AwaitExpr, BinExpr, BlockStmtOrExpr, CallExpr, Callee,
ClassExpr, CondExpr, ContentTagContent, ContentTagEnd, ContentTagExpression,
ContentTagStart, Expr, ExprOrSpread, FnExpr, Import, MemberExpr, MemberProp, MetaPropExpr,
MetaPropKind, NewExpr, ObjectLit, OptCall, OptChainBase, OptChainExpr, ParenExpr,
PatOrExpr, PropOrSpread, SeqExpr, SpreadElement, Super, SuperProp, SuperPropExpr,
TaggedTpl, ThisExpr, Tpl, TplElement, UnaryExpr, UpdateExpr, YieldExpr,
},
expr::*,
function::{Function, Param, ParamOrTsParamProp},
ident::{BindingIdent, Id, Ident, IdentExt, PrivateName},
Expand Down
5 changes: 3 additions & 2 deletions crates/swc_ecma_parser/src/lexer/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,9 @@ pub use self::{
use crate::{
error::{Error, SyntaxError},
lexer::state::ContentTagState,
token::{BinOpToken, Token, Word, *},
token::{BinOpToken, IdentLike, Token, Word},
token::{
BinOpToken, ContentTagContent, ContentTagEnd, ContentTagStart, IdentLike, Token, Word,
},
Context, Syntax,
};

Expand Down
122 changes: 0 additions & 122 deletions crates/swc_ecma_parser/src/macros.rs
Original file line number Diff line number Diff line change
Expand Up @@ -290,128 +290,6 @@ macro_rules! tok {
crate::token::Token::ContentTagEnd
};

// ----------
// Typescript
// ----------
("asserts") => {
crate::token::Token::Word(crate::token::Word::Ident(swc_atoms::js_word!("asserts")))
};
("implements") => {
crate::token::Token::Word(crate::token::Word::Ident(swc_atoms::js_word!("implements")))
};
("is") => {
crate::token::Token::Word(crate::token::Word::Ident(swc_atoms::js_word!("is")))
};
("new") => {
crate::token::Token::Word(crate::token::Word::Ident(swc_atoms::js_word!("new")))
};
("keyof") => {
crate::token::Token::Word(crate::token::Word::Ident(swc_atoms::js_word!("keyof")))
};
("unique") => {
crate::token::Token::Word(crate::token::Word::Ident(swc_atoms::js_word!("unique")))
};
("object") => {
crate::token::Token::Word(crate::token::Word::Ident(swc_atoms::js_word!("object")))
};
("global") => {
crate::token::Token::Word(crate::token::Word::Ident(swc_atoms::js_word!("global")))
};
("require") => {
crate::token::Token::Word(crate::token::Word::Ident(swc_atoms::js_word!("require")))
};
("enum") => {
crate::token::Token::Word(crate::token::Word::Ident(swc_atoms::js_word!("enum")))
};
("readonly") => {
crate::token::Token::Word(crate::token::Word::Ident(swc_atoms::js_word!("readonly")))
};
("as") => {
crate::token::Token::Word(crate::token::Word::Ident(swc_atoms::js_word!("as")))
};
("satisfies") => {
crate::token::Token::Word(crate::token::Word::Ident(swc_atoms::js_word!("satisfies")))
};
("namespace") => {
crate::token::Token::Word(crate::token::Word::Ident(swc_atoms::js_word!("namespace")))
};
("abstract") => {
crate::token::Token::Word(crate::token::Word::Ident(swc_atoms::js_word!("abstract")))
};
("infer") => {
crate::token::Token::Word(crate::token::Word::Ident(swc_atoms::js_word!("infer")))
};
("any") => {
crate::token::Token::Word(crate::token::Word::Ident(swc_atoms::js_word!("any")))
};
("boolean") => {
crate::token::Token::Word(crate::token::Word::Ident(swc_atoms::js_word!("boolean")))
};
("bigint") => {
crate::token::Token::Word(crate::token::Word::Ident(swc_atoms::js_word!("bigint")))
};
("intrinsic") => {
crate::token::Token::Word(crate::token::Word::Ident(swc_atoms::js_word!("intrinsic")))
};
("never") => {
crate::token::Token::Word(crate::token::Word::Ident(swc_atoms::js_word!("never")))
};
("number") => {
crate::token::Token::Word(crate::token::Word::Ident(swc_atoms::js_word!("number")))
};
("string") => {
crate::token::Token::Word(crate::token::Word::Ident(swc_atoms::js_word!("string")))
};
("symbol") => {
crate::token::Token::Word(crate::token::Word::Ident(swc_atoms::js_word!("symbol")))
};
("unknown") => {
crate::token::Token::Word(crate::token::Word::Ident(swc_atoms::js_word!("unknown")))
};
("require") => {
crate::token::Token::Word(crate::token::Word::Ident(swc_atoms::js_word!("require")))
};
("interface") => {
crate::token::Token::Word(crate::token::Word::Ident(swc_atoms::js_word!("interface")))
};
("declare") => {
crate::token::Token::Word(crate::token::Word::Ident(swc_atoms::js_word!("declare")))
};
("override") => {
crate::token::Token::Word(crate::token::Word::Ident(swc_atoms::js_word!("override")))
};
("undefined") => {
crate::token::Token::Word(crate::token::Word::Ident(swc_atoms::js_word!("undefined")))
};
("meta") => {
crate::token::Token::Word(crate::token::Word::Ident(swc_atoms::js_word!("meta")))
};
("type") => {
crate::token::Token::Word(crate::token::Word::Ident(swc_atoms::js_word!("type")))
};
("assert") => {
crate::token::Token::Word(crate::token::Word::Ident(swc_atoms::js_word!("assert")))
};
("get") => {
crate::token::Token::Word(crate::token::Word::Ident(swc_atoms::js_word!("get")))
};
("set") => {
crate::token::Token::Word(crate::token::Word::Ident(swc_atoms::js_word!("set")))
};
("out") => {
crate::token::Token::Word(crate::token::Word::Ident(swc_atoms::js_word!("out")))
};
("public") => {
crate::token::Token::Word(crate::token::Word::Ident(swc_atoms::js_word!("public")))
};
("private") => {
crate::token::Token::Word(crate::token::Word::Ident(swc_atoms::js_word!("private")))
};
("protected") => {
crate::token::Token::Word(crate::token::Word::Ident(swc_atoms::js_word!("protected")))
};
("using") => {
crate::token::Token::Word(crate::token::Word::Ident(swc_atoms::js_word!("using")))
($tt:tt) => {
crate::token::Token::Word(crate::token::Word::Ident(crate::token::IdentLike::Known(
known_ident!($tt),
Expand Down

0 comments on commit e2dd8ce

Please sign in to comment.