aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--mesonbuild/mparser.py3
1 files changed, 2 insertions, 1 deletions
diff --git a/mesonbuild/mparser.py b/mesonbuild/mparser.py
index 2db3375..0e7524c 100644
--- a/mesonbuild/mparser.py
+++ b/mesonbuild/mparser.py
@@ -143,7 +143,8 @@ class Lexer:
elif tid == 'string':
# Handle here and not on the regexp to give a better error message.
if match_text.find("\n") != -1:
- raise ParseException("Use ''' (three single quotes) for multiline strings.", self.getline(line_start), lineno, col)
+ mlog.warning("""Newline character in a string detected, use ''' (three single quotes) for multiline strings instead.
+This will become a hard error in a future Meson release.""", self.getline(line_start), lineno, col)
value = match_text[1:-1].replace(r"\'", "'")
value = newline_rx.sub(r'\1\n', value)
value = value.replace(r" \\ ".strip(), r" \ ".strip())