Skip to content

Commit

Permalink
Comment on single byte lexemes (#52)
Browse files Browse the repository at this point in the history
Comment on single byte lexemes.
  • Loading branch information
v-jkegler authored Nov 12, 2024
1 parent 7f9ecb1 commit 4de768e
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions parser/src/earley/parser.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1552,6 +1552,10 @@ impl ParserState {
return false;
}
if let Some(b) = transition_byte {
// At this point there may be a single-byte lexeme after the one
// we just recognized. For example, assuming C language, in the
// token "foo(", once we recognize the "foo" lexeme, we immediately
// have a single byte "(" lexeme. We deal with these here.
let single = shared
.lexer
.check_for_single_byte_lexeme(no_hidden.lexer_state, b);
Expand Down

0 comments on commit 4de768e

Please sign in to comment.