diff options
author | Daniel Mensinger <daniel@mensinger-ka.de> | 2019-06-26 19:46:28 +0200 |
---|---|---|
committer | Daniel Mensinger <daniel@mensinger-ka.de> | 2019-06-28 13:22:37 +0200 |
commit | 35b4ae5d61c1fed573282299b36cf2544c282382 (patch) | |
tree | 091a232f87d92236292b77781a396cfa601d3e82 /mesonbuild/ast/printer.py | |
parent | 3fb0e917aa688bde6792eac4fa6f210dd6c186f5 (diff) | |
download | meson-35b4ae5d61c1fed573282299b36cf2544c282382.zip meson-35b4ae5d61c1fed573282299b36cf2544c282382.tar.gz meson-35b4ae5d61c1fed573282299b36cf2544c282382.tar.bz2 |
ast: printer fix index node printing
Diffstat (limited to 'mesonbuild/ast/printer.py')
-rw-r--r-- | mesonbuild/ast/printer.py | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/mesonbuild/ast/printer.py b/mesonbuild/ast/printer.py index 2de1d0c..c6fb91a 100644 --- a/mesonbuild/ast/printer.py +++ b/mesonbuild/ast/printer.py @@ -118,6 +118,7 @@ class AstPrinter(AstVisitor): self.newline() def visit_IndexNode(self, node: mparser.IndexNode): + node.iobject.accept(self) self.append('[', node) node.index.accept(self) self.append(']', node) @@ -181,7 +182,7 @@ class AstPrinter(AstVisitor): def visit_ArgumentNode(self, node: mparser.ArgumentNode): break_args = (len(node.arguments) + len(node.kwargs)) > self.arg_newline_cutoff for i in node.arguments + list(node.kwargs.values()): - if not isinstance(i, mparser.ElementaryNode): + if not isinstance(i, (mparser.ElementaryNode, mparser.IndexNode)): break_args = True if break_args: self.newline() |