Fix UB for LookaheadIterator

This commit is contained in:
Andrew Hlynskyi 2023-08-02 21:36:52 +03:00
parent 63e1bc458b
commit 4eb22ed3ae
2 changed files with 7 additions and 8 deletions

View file

@ -27,7 +27,7 @@ fn test_lookahead_iterator() {
assert_ne!(cursor.node().grammar_id(), cursor.node().kind_id());
let expected_symbols = ["identifier", "block_comment", "line_comment"];
let lookahead = language.lookahead_iterator(next_state).unwrap();
let mut lookahead = language.lookahead_iterator(next_state).unwrap();
assert_eq!(lookahead.language(), language);
assert!(lookahead.iter_names().eq(expected_symbols));