~boringcactus/crowbar-reference-compiler

398443f1e29b2f999c953879a91269724dd7c941 — Melody Horn 1 year, 4 months ago 8bab442 main
properly parse parenthesized atomic expressions
1 files changed, 2 insertions(+), 0 deletions(-)

M crowbar_reference_compiler/ast.py
M crowbar_reference_compiler/ast.py => crowbar_reference_compiler/ast.py +2 -0
@@ 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 == '('