Fix up token_tree_to_syntax_node float split handling

This commit is contained in:
Lukas Wirth 2023-02-07 15:21:37 +01:00
parent 9053bcc65c
commit c6e7917d6e
5 changed files with 76 additions and 12 deletions

View file

@ -102,10 +102,12 @@ impl TopEntryPoint {
match step {
Step::Enter { .. } => depth += 1,
Step::Exit => depth -= 1,
Step::FloatSplit { .. } | Step::Token { .. } | Step::Error { .. } => (),
Step::FloatSplit { .. } => depth -= 1,
Step::Token { .. } | Step::Error { .. } => (),
}
}
assert!(!first, "no tree at all");
assert_eq!(depth, 0, "unbalanced tree");
}
res