RustPython/Parser

Error in source yields infinite iterator

nithinmuthukumar opened this issue · 0 comments

let tokens = lex("print(", Mode::Expression);
tokens is an infinite iterator when the source contains an error.
Is it intended behaviour for the iterator to be infinite?