Skip to content

Commit 66354a9

Browse files
committed
Fix lexer warning by silently ignoring invalid characters
1 parent dcdd8d1 commit 66354a9

1 file changed

Lines changed: 3 additions & 0 deletions

File tree

sifter/grammar/lexer.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -93,6 +93,9 @@ def t_newline(t):
9393
r'(\r\n)+'
9494
t.lexer.lineno += t.value.count('\n')
9595

96+
def t_error(t):
97+
t.lexer.skip(1)
98+
9699

97100
if __name__ == '__main__':
98101
# PLY has a simple debugging mode that'll print out tokens for input coming

0 commit comments

Comments
 (0)