Skip to content

Commit

Permalink
refactor: replace the state machine with the generated parser machine…
Browse files Browse the repository at this point in the history
…ry (#36)

Part of #29.

---------

Signed-off-by: Sasha Pourcelot <[email protected]>
  • Loading branch information
scrabsha authored Apr 18, 2024
1 parent 8a4ce44 commit cb2e1f4
Show file tree
Hide file tree
Showing 3 changed files with 92 additions and 510 deletions.
1 change: 1 addition & 0 deletions expandable-impl/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ rust-version = "1.65.0"
[dependencies]
# MSRV: 1.36 (checked in CI)
smallvec = "1.11"
rust-grammar-dpdfa = { path = "../rust-grammar-dpdfa" }

[dev-dependencies]
# MSRV: 1.45 (crate-level documentation)
Expand Down
2 changes: 1 addition & 1 deletion expandable-impl/src/expansion.rs
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ where

states
.into_iter()
.try_for_each(|(state, _, _)| state.is_accepting())
.try_for_each(|(mut state, _, _)| state.is_accepting())
.map_err(|e| match e {
Some((span, expected)) => Error::InvalidProducedAst { span, expected },
None => Error::UnexpectedEnd {
Expand Down
Loading

0 comments on commit cb2e1f4

Please sign in to comment.