Skip to content

Commit

Permalink
Merge pull request #41 from metaborg/records-example
Browse files Browse the repository at this point in the history
records example
  • Loading branch information
jdonszelmann authored May 24, 2024
2 parents e67dd20 + f1b638b commit a128fa7
Show file tree
Hide file tree
Showing 13 changed files with 860 additions and 17 deletions.
2 changes: 1 addition & 1 deletion scopegraphs-regular-expressions/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ rust-version = "1.75"

# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html
[dependencies]
syn = { version = "2.0.29", default-features = false, features = ["parsing"] }
syn = { version = "2.0.29", default-features = false, features = ["parsing", "derive", "printing"] }
quote = { version = "1.0.33", optional = true }
proc-macro2 = "1.0.69"
thiserror = "1.0.50"
Expand Down
1 change: 1 addition & 0 deletions scopegraphs-regular-expressions/src/compile.rs
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@ impl MatchState {
/// This struct can either be turned into a
/// * [`DynamicMatcher`](crate::dynamic::DynamicMatcher) to match on a regex that was compiled at runtime.
/// * An implementation of [`RegexMatcher`](crate::RegexMatcher) generated using [emit](Automaton::emit).
///
/// This function can be called at compile time (through the `compile_regex!` macro) and it
/// emits the Rust code that can match the regular expression.
///
Expand Down
2 changes: 1 addition & 1 deletion scopegraphs-regular-expressions/src/emit.rs
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ impl Automaton {
quote!(
match token {
#(
#matchers => {self.state = #new_states;}
#alphabet::#matchers => {self.state = #new_states;}
),*
_ => {self.state = #default_transition;}
}
Expand Down
3 changes: 3 additions & 0 deletions scopegraphs/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,9 @@ scopegraphs-regular-expressions = { path = "../scopegraphs-regular-expressions",
env_logger = "0.10.1"
ctor = "0.2.5"
futures = { version = "0.3.30", default-features = false, features = ["alloc", "executor"] }
smol = "2.0.0"
async-recursion = "1.1.1"
winnow = "0.6.8"

[features]
default = ["dot", "dynamic-regex"]
Expand Down
Loading

0 comments on commit a128fa7

Please sign in to comment.