diff options
-rw-r--r-- | mesonbuild/mparser.py | 2 | ||||
-rw-r--r-- | test cases/unit/118 rewrite/meson.build | 12 |
2 files changed, 7 insertions, 7 deletions
diff --git a/mesonbuild/mparser.py b/mesonbuild/mparser.py index a161842..0f63c9e 100644 --- a/mesonbuild/mparser.py +++ b/mesonbuild/mparser.py @@ -121,7 +121,7 @@ class Lexer: ('fstring', re.compile(r"f'([^'\\]|(\\.))*'")), ('id', re.compile('[_a-zA-Z][_0-9a-zA-Z]*')), ('number', re.compile(r'0[bB][01]+|0[oO][0-7]+|0[xX][0-9a-fA-F]+|0|[1-9]\d*')), - ('eol_cont', re.compile(r'\\\n')), + ('eol_cont', re.compile(r'\\[ \t]*(#.*)?\n')), ('eol', re.compile(r'\n')), ('multiline_string', re.compile(r"'''(.|\n)*?'''", re.M)), ('comment', re.compile(r'#.*')), diff --git a/test cases/unit/118 rewrite/meson.build b/test cases/unit/118 rewrite/meson.build index cb8c15f..7d0330b 100644 --- a/test cases/unit/118 rewrite/meson.build +++ b/test cases/unit/118 rewrite/meson.build @@ -173,12 +173,12 @@ no_string_escapes = '''\\\'\a\b\f\n\r\t\v\046\x26\u2D4d\U00002d4d\N{GREEK CAPITA # cont_string = 'blablabla\ # blablabla' -# FIXME: is it supposed to work? (cont_eol with whitespace and comments after) -# if a \ # comment in cont 1 -# and b \ # comment in cont 2 -# or c # comment in cont 3 -# message('ok') -# endif +# cont_eol with whitespace and comments after +if a \ # comment in cont 1 + and b \ # comment in cont 2 + or c # comment in cont 3 + message('ok') +endif if a \ or b |