diff options
| author | Charles Brunet <charles.brunet@optelgroup.com> | 2024-05-22 09:22:19 -0400 |
|---|---|---|
| committer | Eli Schwartz <eschwartz93@gmail.com> | 2024-06-19 00:07:01 -0400 |
| commit | bef2fbf75bcea180affc19ebba280708109247a2 (patch) | |
| tree | fb69d4fc74b843ddc0322dcd986c3926f6d32229 /mesonbuild | |
| parent | 9f4253164aad64297b7d8c001d953217582b2196 (diff) | |
| download | meson-bef2fbf75bcea180affc19ebba280708109247a2.tar.gz | |
Fix crash in meson format
There was a case where a trailing comma was missing a whitespaces attribute
Fixes #13242
Diffstat (limited to 'mesonbuild')
| -rw-r--r-- | mesonbuild/mformat.py | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/mesonbuild/mformat.py b/mesonbuild/mformat.py index 68c9a1f8f..5e3701931 100644 --- a/mesonbuild/mformat.py +++ b/mesonbuild/mformat.py @@ -626,6 +626,7 @@ class ArgumentFormatter(FullAstVisitor): if need_comma and not has_trailing_comma: comma = mparser.SymbolNode(mparser.Token('comma', node.filename, 0, 0, 0, (0, 0), ',')) comma.condition_level = node.condition_level + comma.whitespaces = mparser.WhitespaceNode(mparser.Token('whitespace', node.filename, 0, 0, 0, (0, 0), '')) node.commas.append(comma) elif has_trailing_comma and not need_comma: node.commas.pop(-1) |
