diff --git a/ecmascript/parser/Cargo.toml b/ecmascript/parser/Cargo.toml index 48df3340ca99..6d5996c14fae 100644 --- a/ecmascript/parser/Cargo.toml +++ b/ecmascript/parser/Cargo.toml @@ -11,15 +11,15 @@ edition = "2018" [features] default = [] # Requires nightly. -fold = ["swc_common/fold", "ast/fold"] +fold = ["swc_common/fold", "swc_ecma_ast/fold"] # Verify that expression is valid. Requires nightly. verify = ["fold"] [dependencies] swc_atoms = { version = "0.2", path ="../../atoms" } swc_common = { version = "0.4.0", path ="../../common" } -ast = { package = "swc_ecma_ast", version = "0.10.0", path ="../ast" } -parser_macros = { package = "swc_ecma_parser_macros", version = "0.4", path ="./macros" } +swc_ecma_ast = { version = "0.10.0", path ="../ast" } +swc_ecma_parser_macros = { package = "swc_ecma_parser_macros", version = "0.4", path ="./macros" } enum_kind = { version = "0.2", path ="../../macros/enum_kind" } unicode-xid = "0.2" log = { version = "0.4", features = ["release_max_level_debug"] } diff --git a/ecmascript/parser/src/lexer.rs b/ecmascript/parser/src/lexer.rs index 8953973c9ac2..be1c97bfe4a6 100644 --- a/ecmascript/parser/src/lexer.rs +++ b/ecmascript/parser/src/lexer.rs @@ -15,7 +15,7 @@ use crate::{ Context, JscTarget, Session, Syntax, }; -use ast::Str; +use swc_ecma_ast::Str; use smallvec::{smallvec, SmallVec}; use std::{char, iter::FusedIterator}; use swc_atoms::JsWord; diff --git a/ecmascript/parser/src/parser.rs b/ecmascript/parser/src/parser.rs index 7b0313d74b12..6da8cb438aba 100644 --- a/ecmascript/parser/src/parser.rs +++ b/ecmascript/parser/src/parser.rs @@ -8,8 +8,8 @@ use crate::{ token::{Token, Word}, Context, JscTarget, Session, Syntax, }; -use ast::*; -use parser_macros::parser; +use swc_ecma_ast::*; +use swc_ecma_parser_macros::parser; use std::ops::{Deref, DerefMut}; use swc_atoms::JsWord; use swc_common::{comments::Comments, errors::DiagnosticBuilder, input::Input, BytePos, Span}; diff --git a/ecmascript/parser/src/parser/class_and_fn.rs b/ecmascript/parser/src/parser/class_and_fn.rs index 030e5eb70246..a0154ae1f1ad 100644 --- a/ecmascript/parser/src/parser/class_and_fn.rs +++ b/ecmascript/parser/src/parser/class_and_fn.rs @@ -1,7 +1,7 @@ use super::{ident::MaybeOptionalIdentParser, *}; use crate::{error::SyntaxError, Tokens}; use either::Either; -use parser_macros::parser; +use swc_ecma_parser_macros::parser; use swc_atoms::js_word; use swc_common::Spanned; diff --git a/ecmascript/parser/src/parser/ident.rs b/ecmascript/parser/src/parser/ident.rs index bf1fbde9d1bd..38c52c099428 100644 --- a/ecmascript/parser/src/parser/ident.rs +++ b/ecmascript/parser/src/parser/ident.rs @@ -2,7 +2,7 @@ use super::*; use crate::token::Keyword; use either::Either; -use parser_macros::parser; +use swc_ecma_parser_macros::parser; use swc_atoms::js_word; #[parser] diff --git a/ecmascript/parser/src/token.rs b/ecmascript/parser/src/token.rs index d10b1bb57143..2e6d235b3388 100644 --- a/ecmascript/parser/src/token.rs +++ b/ecmascript/parser/src/token.rs @@ -3,8 +3,8 @@ //! [babel/bablyon]:https://github.com/babel/babel/blob/2d378d076eb0c5fe63234a8b509886005c01d7ee/packages/babylon/src/tokenizer/types.js pub(crate) use self::{AssignOpToken::*, BinOpToken::*, Keyword::*, Token::*}; use crate::error::Error; -pub(crate) use ast::AssignOp as AssignOpToken; -use ast::{BinaryOp, Str}; +pub(crate) use swc_ecma_ast::AssignOp as AssignOpToken; +use swc_ecma_ast::{BinaryOp, Str}; use enum_kind::Kind; use std::{ borrow::Cow, diff --git a/ecmascript/parser/tests/jsx.rs b/ecmascript/parser/tests/jsx.rs index 2a8b2ef1d5b2..fc0bdd94307d 100644 --- a/ecmascript/parser/tests/jsx.rs +++ b/ecmascript/parser/tests/jsx.rs @@ -5,7 +5,7 @@ extern crate test; -use ast::*; +use swc_ecma_ast::*; use pretty_assertions::assert_eq; use serde_json; use std::{ diff --git a/ecmascript/parser/tests/test262.rs b/ecmascript/parser/tests/test262.rs index 72200c70bfda..de06a20dc262 100644 --- a/ecmascript/parser/tests/test262.rs +++ b/ecmascript/parser/tests/test262.rs @@ -5,7 +5,7 @@ extern crate test; -use ast::*; +use swc_ecma_ast::*; use std::{ env, fs::{read_dir, File}, diff --git a/ecmascript/parser/tests/typescript.rs b/ecmascript/parser/tests/typescript.rs index 957ede2289e9..763ebbdd6041 100644 --- a/ecmascript/parser/tests/typescript.rs +++ b/ecmascript/parser/tests/typescript.rs @@ -5,7 +5,7 @@ extern crate test; -use ast::*; +use swc_ecma_ast::*; use pretty_assertions::assert_eq; use std::{ env,