osa1 / lexgen

A fully-featured lexer generator, implemented as a proc macro
MIT License
63 stars 7 forks source link

Reset lexer state on failure #49

Closed osa1 closed 2 years ago

osa1 commented 2 years ago

Fixes #48

osa1 commented 2 years ago

Note that this also resets the current match in InvalidToken errors. We should probably add a test to check this.

(Other kind of errors already reset the current match as they're raised in semantic actions)

osa1 commented 2 years ago

Note that this also resets the current match in InvalidToken errors. We should probably add a test to check this.

Test added with the commit referenced above.