Fix hygiene

This commit is contained in:
강동윤 2020-03-03 16:19:45 +09:00
parent 6e028696a5
commit 165a2091f9
2 changed files with 8 additions and 2 deletions

View File

@ -1,6 +1,6 @@
[package] [package]
name = "swc_common" name = "swc_common"
version = "0.5.7" version = "0.5.8"
authors = ["강동윤 <kdy1997.dev@gmail.com>"] authors = ["강동윤 <kdy1997.dev@gmail.com>"]
license = "Apache-2.0/MIT" license = "Apache-2.0/MIT"
repository = "https://github.com/swc-project/swc.git" repository = "https://github.com/swc-project/swc.git"

View File

@ -130,13 +130,19 @@ impl Mark {
} }
} }
#[derive(Debug, Default)] #[derive(Debug)]
pub(crate) struct HygieneData { pub(crate) struct HygieneData {
marks: Vec<MarkData>, marks: Vec<MarkData>,
syntax_contexts: Vec<SyntaxContextData>, syntax_contexts: Vec<SyntaxContextData>,
markings: HashMap<(SyntaxContext, Mark), SyntaxContext>, markings: HashMap<(SyntaxContext, Mark), SyntaxContext>,
} }
impl Default for HygieneData {
fn default() -> Self {
Self::new()
}
}
impl HygieneData { impl HygieneData {
pub(crate) fn new() -> Self { pub(crate) fn new() -> Self {
HygieneData { HygieneData {