feat: add 'reserved word' construct

Co-authored-by: Amaan Qureshi <amaanq12@gmail.com>
This commit is contained in:
Max Brunsfeld 2024-12-23 00:06:32 -08:00 committed by GitHub
parent 2a63077cac
commit 201b41cf11
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
31 changed files with 2367 additions and 1628 deletions

View file

@ -3,7 +3,7 @@ pub fn split_state_id_groups<S>(
state_ids_by_group_id: &mut Vec<Vec<usize>>,
group_ids_by_state_id: &mut [usize],
start_group_id: usize,
mut f: impl FnMut(&S, &S, &[usize]) -> bool,
mut should_split: impl FnMut(&S, &S, &[usize]) -> bool,
) -> bool {
let mut result = false;
@ -33,7 +33,7 @@ pub fn split_state_id_groups<S>(
}
let right_state = &states[right_state_id];
if f(left_state, right_state, group_ids_by_state_id) {
if should_split(left_state, right_state, group_ids_by_state_id) {
split_state_ids.push(right_state_id);
}