Skip to content

Commit

Permalink
Fix parsing of templates and buses without arguments (#7)
Browse files Browse the repository at this point in the history
* Fixed parsing of templates and buses without arguments
  • Loading branch information
KyrylR authored Nov 21, 2024
1 parent ca0f30f commit 6b24f90
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion data/Example3.circom
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
bus B1(){
bus B1 {
signal x;
}

Expand Down
4 changes: 2 additions & 2 deletions grammar/CircomParser.g4
Original file line number Diff line number Diff line change
Expand Up @@ -44,10 +44,10 @@ blockDefiniton
functionDefinition: 'function' ID '(' argNames=simpleIdentifierList? ')' body ;

templateDefinition
: 'template' 'custom'? 'parallel'? ID '(' argNames=simpleIdentifierList? ')' body
: 'template' 'custom'? 'parallel'? ID ('(' argNames=simpleIdentifierList? ')')? body
;

busDefinition: 'bus' ID '(' argNames=simpleIdentifierList? ')' body ;
busDefinition: 'bus' ID ('(' argNames=simpleIdentifierList? ')')? body ;

publicInputsDefinition: '{' 'public' '[' publicInputs=simpleIdentifierList ']' '}' ;

Expand Down

0 comments on commit 6b24f90

Please sign in to comment.