From af7c9dd6e0941bbc46b553fb2ac37e117b4b06c2 Mon Sep 17 00:00:00 2001 From: Jussi Pakkanen Date: Sun, 23 Dec 2012 17:11:59 +0200 Subject: [PATCH] Allow whitespace in EOL continuation. --- builder.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/builder.py b/builder.py index e415456f9..ae39d9800 100755 --- a/builder.py +++ b/builder.py @@ -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()