aboutsummaryrefslogtreecommitdiff
path: root/bird-machine-macros
diff options
context:
space:
mode:
Diffstat (limited to 'bird-machine-macros')
-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
}