diff options
author | Melody Horn <melody@boringcactus.com> | 2020-12-28 18:01:43 -0700 |
---|---|---|
committer | Melody Horn <melody@boringcactus.com> | 2020-12-28 18:01:43 -0700 |
commit | 398443f1e29b2f999c953879a91269724dd7c941 (patch) | |
tree | e7439cd8e6414bea1d2a59bab1d57301b02d1abc | |
parent | 8bab44263e563dddf071b7c2c0faa3e3c7168e39 (diff) | |
download | reference-compiler-398443f1e29b2f999c953879a91269724dd7c941.tar.gz reference-compiler-398443f1e29b2f999c953879a91269724dd7c941.zip |
-rw-r--r-- | crowbar_reference_compiler/ast.py | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/crowbar_reference_compiler/ast.py b/crowbar_reference_compiler/ast.py index 7ae7ff9..cf12a2f 100644 --- a/crowbar_reference_compiler/ast.py +++ b/crowbar_reference_compiler/ast.py @@ -607,6 +607,8 @@ class ASTBuilder(NodeVisitor): return body def visit_AtomicExpression(self, node, visited_children) -> Expression: + while isinstance(visited_children, list) and len(visited_children) == 1: + visited_children = visited_children[0] if isinstance(visited_children, list) and len(visited_children) == 3: lparen, body, rparen = visited_children assert lparen.type == '(' |