Skip to content

Commit

Permalink
Collect all comments (#633)
Browse files Browse the repository at this point in the history
 - Comments are now appended
 - pin dashmap's version
  • Loading branch information
kdy1 authored Feb 7, 2020
1 parent 05be89c commit 26eb4e3
Show file tree
Hide file tree
Showing 5 changed files with 6 additions and 6 deletions.
2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ once_cell = "1"
hashbrown = "0.6"
regex = "1"
either = "1"
dashmap = "3.2.2"
dashmap = "=3.4.0"
sourcemap = "4.1.1 "

[dev-dependencies]
Expand Down
4 changes: 2 additions & 2 deletions common/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "swc_common"
version = "0.5.0"
version = "0.5.2"
authors = ["강동윤 <kdy1997.dev@gmail.com>"]
license = "Apache-2.0/MIT"
repository = "https://github.com/swc-project/swc.git"
Expand Down Expand Up @@ -28,7 +28,7 @@ parking_lot = "0.7.1"
hashbrown = "0.6"
termcolor = "1.0"
serde = { version = "1", features = ["derive"] }
dashmap = "3.2.2"
dashmap = "=3.4.0"
fxhash = "0.2.1"


Expand Down
2 changes: 1 addition & 1 deletion common/src/comments.rs
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ impl Default for Comments {

impl Comments {
pub fn add_leading(&self, pos: BytePos, cmt: Vec<Comment>) {
self.leading.insert(pos, cmt);
self.leading.entry(pos).or_default().extend(cmt);
}

pub fn add_trailing(&self, pos: BytePos, cmt: Comment) {
Expand Down
2 changes: 1 addition & 1 deletion ecmascript/preset_env/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ once_cell = "1.2.0"
hashbrown = "0.6"
st-map = "0.1.2"
fxhash = "0.2.1"
dashmap = "3.2.2"
dashmap = "=3.4.0"

[dev-dependencies]
swc_ecma_codegen = { path = "../codegen" }
Expand Down
2 changes: 1 addition & 1 deletion ecmascript/transforms/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ swc_common = { version = "0.5.0", path ="../../common" }
swc_ecma_ast = { version = "0.16.0", path ="../ast" }
swc_ecma_utils = { version = "0.3.0", path ="../utils" }
swc_ecma_parser = { version = "0.18", path ="../parser", features = ["verify"] }
dashmap = "3.2.2"
dashmap = "=3.4.0"
either = "1.5"
fxhash = "0.2"
indexmap = "1"
Expand Down

0 comments on commit 26eb4e3

Please sign in to comment.