diff options
author | Charles Brunet <charles.brunet@optelgroup.com> | 2023-08-23 14:28:40 -0400 |
---|---|---|
committer | Charles Brunet <charles.brunet@optelgroup.com> | 2023-09-11 07:51:18 -0400 |
commit | 8d357ba62cba0c5ddf3265743454b0ddcb08d83f (patch) | |
tree | 594262d00e74507f532822e1b4bf8538c7b19c89 /mesonbuild/ast/printer.py | |
parent | 306562b4666dea7828af680afbd4d111e667027f (diff) | |
download | meson-8d357ba62cba0c5ddf3265743454b0ddcb08d83f.zip meson-8d357ba62cba0c5ddf3265743454b0ddcb08d83f.tar.gz meson-8d357ba62cba0c5ddf3265743454b0ddcb08d83f.tar.bz2 |
parser: use IdNode for foreach varnames
Diffstat (limited to 'mesonbuild/ast/printer.py')
-rw-r--r-- | mesonbuild/ast/printer.py | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/mesonbuild/ast/printer.py b/mesonbuild/ast/printer.py index 020299d..410aabd 100644 --- a/mesonbuild/ast/printer.py +++ b/mesonbuild/ast/printer.py @@ -185,7 +185,7 @@ class AstPrinter(AstVisitor): def visit_ForeachClauseNode(self, node: mparser.ForeachClauseNode) -> None: node.lineno = self.curr_line or node.lineno self.append_padded('foreach', node) - self.append_padded(', '.join(node.varnames), node) + self.append_padded(', '.join(varname.value for varname in node.varnames), node) self.append_padded(':', node) node.items.accept(self) self.newline() @@ -373,7 +373,7 @@ class AstJSONPrinter(AstVisitor): def visit_ForeachClauseNode(self, node: mparser.ForeachClauseNode) -> None: self._accept('items', node.items) self._accept('block', node.block) - self.current['varnames'] = node.varnames + self.current['varnames'] = [varname.value for varname in node.varnames] self.setbase(node) def visit_IfClauseNode(self, node: mparser.IfClauseNode) -> None: |