File tree Expand file tree Collapse file tree 3 files changed +4
-1
lines changed
Expand file tree Collapse file tree 3 files changed +4
-1
lines changed Original file line number Diff line number Diff line change @@ -8,6 +8,7 @@ import { ExtendedCircomParser } from "./ExtendedCircomParser";
88export function getCircomParser ( source : string ) : ExtendedCircomParser {
99 let inputStream : antlr4 . CharStream ;
1010 let fileIdentifier = "Built from source" ;
11+
1112 if ( fs . existsSync ( source ) ) {
1213 inputStream = antlr4 . CharStreams . fromPathSync ( source , "utf8" ) ;
1314 fileIdentifier = source ;
Original file line number Diff line number Diff line change @@ -147,6 +147,7 @@ class ExpressionVisitor extends ExtendedCircomVisitor<CircomValueType | null> {
147147 "IdentifierStatement is not supported with access references that are not arrays" ,
148148 ctx ,
149149 ) ;
150+
150151 return null ;
151152 }
152153
Original file line number Diff line number Diff line change @@ -33,6 +33,7 @@ export function buildVariableContext(
3333 getArrayDimensions ( values [ i ] ) ,
3434 values [ i ] ,
3535 ) ;
36+
3637 for ( const key in bindContext ) {
3738 if ( bindContext [ key ] !== null ) {
3839 context [ key ] = bindContext [ key ] ;
@@ -57,8 +58,8 @@ export function bindVariableContext(
5758 values : any ,
5859) : VariableContextWithNull {
5960 const context : VariableContextWithNull = { } ;
60-
6161 const resolved = resolveDimensions ( variableName , dimensions ) ;
62+
6263 for ( const variable of resolved ) {
6364 try {
6465 context [ variable ] = parseVariable (
You can’t perform that action at this time.
0 commit comments