aboutsummaryrefslogtreecommitdiff
path: root/bird-machine-macros/src
diff options
context:
space:
mode:
authorMelody Horn <melody@boringcactus.com>2021-04-01 12:35:47 -0600
committerMelody Horn <melody@boringcactus.com>2021-04-01 12:35:47 -0600
commit5ea07dac9cbdda5333a77b0b90cec8cf5465131a (patch)
treefe5c5fb055e3ed55d57f402013d858b56f626b5e /bird-machine-macros/src
parent9d1c8e72300338bc2e5068f0e9699af386caf8ce (diff)
downloadbird-machine-5ea07dac9cbdda5333a77b0b90cec8cf5465131a.tar.gz
bird-machine-5ea07dac9cbdda5333a77b0b90cec8cf5465131a.zip
actually handle concat logic correctly
Diffstat (limited to 'bird-machine-macros/src')
-rw-r--r--bird-machine-macros/src/nfa.rs6
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
}