public class DefaultCodeBuilder.BaseCaller extends DefaultCodeBuilder.BaseCode implements Code.Caller
Code.Caller.Arguments
Code.Caller, Code.Constant, Code.Identifier
BINARY_OPERATOR, FUNCTION, UNARY_OPERATOR
CALLER, CONSTANT, IDENTIFIER, UNDEFINED
Constructor and Description |
---|
BaseCaller(String name,
int type,
Code.Caller.Arguments args) |
Modifier and Type | Method and Description |
---|---|
void |
accept(Visitor visitor)
Provides each value of this container to the provided
Visitor . |
Code.Caller.Arguments |
args() |
Object |
call(Interpreter interpreter,
Object[] args) |
int |
code() |
Function |
function() |
Function |
function(Function function) |
String |
name() |
String |
toString() |
int |
type() |
public BaseCaller(String name, int type, Code.Caller.Arguments args)
public int code()
code
in interface Code
code
in class DefaultCodeBuilder.BaseCode
public Object call(Interpreter interpreter, Object[] args) throws Exception
call
in interface Code.Caller
Exception
public String name()
name
in interface Code.Caller
public Function function()
function
in interface Code.Caller
public Function function(Function function)
function
in interface Code.Caller
public Code.Caller.Arguments args()
args
in interface Code.Caller
public int type()
type
in interface Code.Caller
public void accept(Visitor visitor) throws BaseException
Visitable
Visitor
.accept
in interface Visitable
accept
in class DefaultCodeBuilder.BaseCode
visitor
- the visitor to apply to each value.BaseException
- if there is an error while performing the visit