fix: Strip unused token ids from eager macro input token maps

This commit is contained in:
Lukas Wirth 2023-07-31 17:12:17 +02:00
parent bf5624664d
commit c7b34e4873
5 changed files with 37 additions and 7 deletions

View file

@ -70,7 +70,7 @@ pub mod token_id {
}
impl Subtree {
pub fn visit_ids(&mut self, f: &impl Fn(TokenId) -> TokenId) {
pub fn visit_ids(&mut self, f: &mut impl FnMut(TokenId) -> TokenId) {
self.delimiter.open = f(self.delimiter.open);
self.delimiter.close = f(self.delimiter.close);
self.token_trees.iter_mut().for_each(|tt| match tt {