Skip to content

Commit e105b17

Browse files
committed
Add Javadocs
1 parent 6f0b233 commit e105b17

File tree

1 file changed

+19
-2
lines changed
  • liquidjava-verifier/src/main/java/liquidjava/rj_language/ast

1 file changed

+19
-2
lines changed

liquidjava-verifier/src/main/java/liquidjava/rj_language/ast/Expression.java

Lines changed: 19 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -281,7 +281,6 @@ public void validateGhostInvocations(Context ctx, Factory f) throws LJError {
281281
throwArgumentMismatchError(fi, candidates.get(0), ctx, f);
282282
}
283283
}
284-
285284
// recurse children
286285
if (hasChildren()) {
287286
for (Expression child : children) {
@@ -290,6 +289,14 @@ public void validateGhostInvocations(Context ctx, Factory f) throws LJError {
290289
}
291290
}
292291

292+
/**
293+
* Checks if the arguments of the given function invocation match the parameters of the given ghost function
294+
*
295+
* @param fi
296+
* @param g
297+
* @param ctx
298+
* @param f
299+
*/
293300
private boolean argumentsMatch(FunctionInvocation fi, GhostFunction g, Context ctx, Factory f) {
294301
// check argument count
295302
if (fi.children.size() != g.getParametersTypes().size())
@@ -311,8 +318,18 @@ private boolean argumentsMatch(FunctionInvocation fi, GhostFunction g, Context c
311318
return true;
312319
}
313320

321+
/**
322+
* Throws an ArgumentMismatchError for the given function invocation and ghost function
323+
*
324+
* @param fi
325+
* @param g
326+
* @param ctx
327+
* @param f
328+
*
329+
* @throws ArgumentMismatchError
330+
*/
314331
private void throwArgumentMismatchError(FunctionInvocation fi, GhostFunction g, Context ctx, Factory f)
315-
throws LJError {
332+
throws ArgumentMismatchError {
316333
if (fi.children.size() != g.getParametersTypes().size()) {
317334
throw new ArgumentMismatchError(
318335
String.format("Wrong number of arguments in ghost invocation '%s': expected %d, got %d", fi.name,

0 commit comments

Comments
 (0)