diff options
author | Melody Horn <melody@boringcactus.com> | 2021-04-01 12:35:47 -0600 |
---|---|---|
committer | Melody Horn <melody@boringcactus.com> | 2021-04-01 12:35:47 -0600 |
commit | 5ea07dac9cbdda5333a77b0b90cec8cf5465131a (patch) | |
tree | fe5c5fb055e3ed55d57f402013d858b56f626b5e /bird-machine-macros | |
parent | 9d1c8e72300338bc2e5068f0e9699af386caf8ce (diff) | |
download | bird-machine-5ea07dac9cbdda5333a77b0b90cec8cf5465131a.tar.gz bird-machine-5ea07dac9cbdda5333a77b0b90cec8cf5465131a.zip |
actually handle concat logic correctly
Diffstat (limited to 'bird-machine-macros')
-rw-r--r-- | bird-machine-macros/src/nfa.rs | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/bird-machine-macros/src/nfa.rs b/bird-machine-macros/src/nfa.rs index 833353e..d964de7 100644 --- a/bird-machine-macros/src/nfa.rs +++ b/bird-machine-macros/src/nfa.rs @@ -146,7 +146,11 @@ impl NFA { .insert(other_state_offset); } // steal the other machine's accept states - self.accept_states = other.accept_states; + self.accept_states = other + .accept_states + .into_iter() + .map(|x| x + other_state_offset) + .collect(); self } |