Comments end when the input ends or a newline occurs

This fixes #382, which occured because the REPL doesn't use trailing newlines.
This commit is contained in:
Nicolas Dandrimont 2014-01-02 03:09:18 +01:00
parent 77baf3b9f3
commit a44e53f4de

View File

@ -60,7 +60,7 @@ lg.add('STRING', r'''(?x)
lg.add('IDENTIFIER', r'[^()\[\]{}\'"\s;]+')
lg.ignore(r';.*[\r\n]+')
lg.ignore(r';.*(?=\r|\n|$)')
lg.ignore(r'\s+')