Skip to content

Commit 52647bc

Browse files
committed
Add Empty Argument Check For Alias Calls
1 parent 8e09ef3 commit 52647bc

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

liquidjava-verifier/src/main/java/liquidjava/rj_language/visitors/CreateASTVisitor.java

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -165,11 +165,13 @@ private Expression functionCallCreate(FunctionCallContext rc) throws ParsingExce
165165
String name = Utils.qualifyName(prefix, gc.ID().getText());
166166
List<Expression> args = getArgs(gc.args());
167167
if (args.isEmpty())
168-
throw new ParsingException("Function call cannot have empty arguments");
168+
throw new ParsingException("Ghost call cannot have empty arguments");
169169
return new FunctionInvocation(name, args);
170170
} else {
171171
AliasCallContext gc = rc.aliasCall();
172172
List<Expression> args = getArgs(gc.args());
173+
if (args.isEmpty())
174+
throw new ParsingException("Alias call cannot have empty arguments");
173175
return new AliasInvocation(gc.ID_UPPER().getText(), args);
174176
}
175177
}

0 commit comments

Comments
 (0)