diff options
| author | Volker Weißmann <volker.weissmann@gmx.de> | 2023-09-22 17:02:25 +0200 |
|---|---|---|
| committer | Dylan Baker <dylan@pnwbakers.com> | 2025-05-29 09:20:27 -0700 |
| commit | 75103efd9f4216084ffb5ca0bf022dede3327e37 (patch) | |
| tree | 446f37d7434630558f39bc1ed5359288d5d0c6c9 | |
| parent | 4bd3d638afe55f86633a7781cfc6cb68191906f0 (diff) | |
| download | meson-75103efd9f4216084ffb5ca0bf022dede3327e37.tar.gz | |
parser: Fix colno after multiline strings
Without this commit, meson thinks that the `var` token in the code below
starts at a different column number than it actually starts, because the
old author forgot to account for the length of the triple quotes.
```
'''
some multiline strings
abc''' + var
```
| -rw-r--r-- | mesonbuild/mparser.py | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/mesonbuild/mparser.py b/mesonbuild/mparser.py index 30caf703a..a0a8d273e 100644 --- a/mesonbuild/mparser.py +++ b/mesonbuild/mparser.py @@ -201,7 +201,7 @@ class Lexer: lines = value.split('\n') if len(lines) > 1: lineno += len(lines) - 1 - line_start = mo.end() - len(lines[-1]) + line_start = mo.end() - len(lines[-1]) - 3 elif tid == 'eol_cont': lineno += 1 line_start = loc |
