aboutsummaryrefslogtreecommitdiff
path: root/crowbar_reference_compiler
diff options
context:
space:
mode:
authorMelody Horn <melody@boringcactus.com>2020-12-28 18:01:43 -0700
committerMelody Horn <melody@boringcactus.com>2020-12-28 18:01:43 -0700
commit398443f1e29b2f999c953879a91269724dd7c941 (patch)
treee7439cd8e6414bea1d2a59bab1d57301b02d1abc /crowbar_reference_compiler
parent8bab44263e563dddf071b7c2c0faa3e3c7168e39 (diff)
downloadreference-compiler-398443f1e29b2f999c953879a91269724dd7c941.tar.gz
reference-compiler-398443f1e29b2f999c953879a91269724dd7c941.zip
properly parse parenthesized atomic expressionsHEADmain
Diffstat (limited to 'crowbar_reference_compiler')
-rw-r--r--crowbar_reference_compiler/ast.py2
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 == '('