Skip to content

Commit ba00efc

Browse files
authored
Merge pull request #28 from mrkkrp/analyze-macros
Analyze macros
2 parents c029702 + 5e8f4d7 commit ba00efc

File tree

10 files changed

+457
-221
lines changed

10 files changed

+457
-221
lines changed

Cargo.lock

Lines changed: 31 additions & 30 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Cargo.toml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@ path = "rust_parser/main.hs"
1010
[dependencies]
1111
cargo-lock = "11.0.0"
1212
cargo_toml = { version = "0.22.3", features = ["features"]}
13-
syn = { version = "2", features = ["full", "visit", "extra-traits"]}
1413
clap = { version = "4", features = ["derive"]}
1514
lazy_static = "1.5.0"
15+
proc-macro2 = "1"
16+
syn = { version = "2", features = ["full", "visit", "extra-traits"]}

MODULE.bazel.lock

Lines changed: 89 additions & 89 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

README.md

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -136,8 +136,7 @@ is already in scope.
136136
This approach is fairly robust. Please see [`rust_parser/parser.rs`](./rust_parser/parser.rs) for
137137
implementation details and the [parser
138138
tests](https://github.com/Calsign/gazelle_rust/tree/main/rust_parser/test_data) for the range of
139-
cases covered. The only known case that is not handled is paths in macros like `println!`, which is
140-
quite tricky. (Derive macros are handled properly.)
139+
cases covered.
141140

142141
For each dependency, gazelle\_rust identifies the crate in the project (or crate universe
143142
dependency) providing that crate name. gazelle\_rust raises an error if the crate could not be found

example/MODULE.bazel.lock

Lines changed: 89 additions & 89 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

rust_parser/BUILD.bazel

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,10 @@ rust_library(
66
name = "parser",
77
srcs = ["parser.rs"],
88
visibility = [":__subpackages__"],
9-
deps = ["@crates//:syn"],
9+
deps = [
10+
"@crates//:proc-macro2",
11+
"@crates//:syn",
12+
],
1013
)
1114

1215
rust_library(

0 commit comments

Comments
 (0)