Allow whitespace in EOL continuation.

This commit is contained in:
Jussi Pakkanen 2012-12-23 17:11:59 +02:00
parent 57cbee2f33
commit af7c9dd6e0
1 changed files with 2 additions and 2 deletions

View File

@ -37,7 +37,7 @@ t_COMMENT = '\#[^\n]*'
t_COMMA = ','
t_DOT = '\.'
t_STRING = "'[^']*'"
t_EOL_CONTINUE = r'\\\n'
t_EOL_CONTINUE = r'\\[ \t]*\n'
t_EOL = r'\n'
t_ignore = ' \t'
@ -49,7 +49,7 @@ def t_error(t):
def test_lexer():
s = """hello = (something) # this = (that)
function(h)
obj.method(lll, \\
obj.method(lll, \\
'string')
"""
lexer = lex.lex()