mirror of
https://github.com/arnaucube/circom.git
synced 2026-02-06 18:56:40 +01:00
compute block added
This commit is contained in:
@@ -40,6 +40,7 @@ if { return 'if'; }
|
||||
else { return 'else'; }
|
||||
for { return 'for'; }
|
||||
while { return 'while'; }
|
||||
compute { return 'compute'; }
|
||||
do { return 'do'; }
|
||||
return { return 'return'; }
|
||||
include { return 'include'; }
|
||||
@@ -198,6 +199,10 @@ statment
|
||||
{
|
||||
$$ = $1;
|
||||
}
|
||||
| computeStatment
|
||||
{
|
||||
$$ = $1;
|
||||
}
|
||||
| returnStatment
|
||||
{
|
||||
$$ = $1;
|
||||
@@ -302,6 +307,14 @@ doWhileStatment
|
||||
}
|
||||
;
|
||||
|
||||
computeStatment
|
||||
: 'compute' statment
|
||||
{
|
||||
$$ = { type: "COMPUTE", body: $2 };
|
||||
setLines($$, @1, @2);
|
||||
}
|
||||
;
|
||||
|
||||
returnStatment
|
||||
: 'return' expression ';'
|
||||
{
|
||||
|
||||
330
parser/jaz.js
330
parser/jaz.js
File diff suppressed because one or more lines are too long
Reference in New Issue
Block a user