Skip to content

Commit aaec7d3

Browse files
committed
Updated Circom Grammar
1 parent 427af9c commit aaec7d3

File tree

5 files changed

+457
-360
lines changed

5 files changed

+457
-360
lines changed

src/builtin/CircomExpressionVisitor.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,8 @@ export class CircomExpressionVisitor extends CircomVisitor<BigIntOrNestedArray>
5353
column: primary.start.column,
5454
});
5555
} else if (primary.identifier() && this.allowId) {
56-
const id = primary.identifier().ID().getText();
56+
// FIXME: Handle nested components
57+
const id = primary.identifier().ID(0).getText();
5758

5859
if (!(id in this.variablesContext)) {
5960
throw new ParserError({

src/builtin/utils.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ export function parseIdentifier(identifier: IdentifierContext) {
1515
});
1616

1717
return {
18-
name: identifier.ID().getText(),
18+
name: identifier.ID(0).getText(),
1919
dimension: inputDimension,
2020
};
2121
}

0 commit comments

Comments
 (0)