Package tech.ixor.calclox
Interface LoxCallable
- All Known Implementing Classes:
LoxFunction
public interface LoxCallable
Represents a native or user-defined value that CalcLox can invoke.
-
Method Summary
-
Method Details
-
arity
int arity()Returns the required argument count.- Returns:
- the exact number of arguments accepted by this callable
-
call
Invokes the callable with already evaluated arguments.- Parameters:
interpreter- active interpreterarguments- argument values in source order- Returns:
- the call result, or
nullfor CalcLoxnil
-