aboutsummaryrefslogtreecommitdiff
path: root/mesonbuild/mparser.py
diff options
context:
space:
mode:
authorXavier Claessens <xavier.claessens@collabora.com>2019-01-04 10:09:05 -0500
committerJussi Pakkanen <jpakkane@gmail.com>2019-01-05 21:45:37 +0200
commit90c9b868b20b11bb089fc5e0c634d5ed76fea0cb (patch)
treeb94005146c7cd2630c540d60a506d4e06099ee09 /mesonbuild/mparser.py
parent83964f64fa193669ad7543c618568b115c2b212b (diff)
downloadmeson-90c9b868b20b11bb089fc5e0c634d5ed76fea0cb.zip
meson-90c9b868b20b11bb089fc5e0c634d5ed76fea0cb.tar.gz
meson-90c9b868b20b11bb089fc5e0c634d5ed76fea0cb.tar.bz2
parser: Fix line continuation outside of (), [] or {}
The documentation states: "In other cases you can get multi-line statements by ending the line with a \." but that seems to never have worked. Closes: #4720
Diffstat (limited to 'mesonbuild/mparser.py')
-rw-r--r--mesonbuild/mparser.py6
1 files changed, 5 insertions, 1 deletions
diff --git a/mesonbuild/mparser.py b/mesonbuild/mparser.py
index be5c807..fd8052e 100644
--- a/mesonbuild/mparser.py
+++ b/mesonbuild/mparser.py
@@ -190,7 +190,11 @@ This will become a hard error in a future Meson release.""", self.getline(line_s
line_start = mo.end() - len(lines[-1])
elif tid == 'number':
value = int(match_text, base=0)
- elif tid == 'eol' or tid == 'eol_cont':
+ elif tid == 'eol_cont':
+ lineno += 1
+ line_start = loc
+ break
+ elif tid == 'eol':
lineno += 1
line_start = loc
if par_count > 0 or bracket_count > 0 or curl_count > 0: