Skip to content

Commit

Permalink
refactor(embedded): Switch to syn for parsing doc comments
Browse files Browse the repository at this point in the history
The hope is this will result in more resilient comment handling, being
more consistent with rustdoc.

I also hoped for less code but `syn` is doing less than I had expected,
requiring us to copy code over from other parts of rust.  It seems every
proc macro has to do this but there is no guide to it, so they all do it
differently, only covering the cases they thought to test for.

Note that this still won't support `include_str!()`.
  • Loading branch information
epage committed Jun 14, 2023
1 parent 0c14026 commit bae8b9d
Show file tree
Hide file tree
Showing 3 changed files with 302 additions and 146 deletions.
1 change: 0 additions & 1 deletion Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 0 additions & 2 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,6 @@ pretty_env_logger = "0.4"
proptest = "1.1.0"
pulldown-cmark = { version = "0.9.2", default-features = false }
rand = "0.8.5"
regex = "1.8.3"
rustfix = "0.6.0"
same-file = "1.0.6"
security-framework = "2.0.0"
Expand Down Expand Up @@ -153,7 +152,6 @@ pathdiff.workspace = true
pretty_env_logger = { workspace = true, optional = true }
pulldown-cmark.workspace = true
rand.workspace = true
regex.workspace = true
rustfix.workspace = true
semver.workspace = true
serde = { workspace = true, features = ["derive"] }
Expand Down
Loading

0 comments on commit bae8b9d

Please sign in to comment.