Package net.hydromatic.morel.ast
Class Core.Apply
java.lang.Object
net.hydromatic.morel.ast.AstNode
net.hydromatic.morel.ast.Core.BaseNode
net.hydromatic.morel.ast.Core.Exp
net.hydromatic.morel.ast.Core.Apply
- Enclosing class:
Core
Application of a function to its argument.
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionAccepts a shuttle, calling theShuttle.visit(net.hydromatic.morel.ast.Ast.Literal)method appropriate to the type of this node, and returning the result.voidAccepts a visitor, calling theShuttle.visit(net.hydromatic.morel.ast.Ast.Literal)method appropriate to the type of this node, and returning the result.arg(int i) Returns theith argument.args()Returns the argument list (assuming that the arguments are a tuple or record).booleanReturns whether this expression is a call to the given built-in.booleanReturns whether this expression is a constant.(package private) AstWriterMethods inherited from class net.hydromatic.morel.ast.Core.Exp
forEachArg, type
-
Field Details
-
fn
-
arg
-
-
Constructor Details
-
Apply
-
-
Method Details
-
args
Returns the argument list (assuming that the arguments are a tuple or record).- Throws:
ClassCastException- if argument is not a tuple
-
arg
Description copied from class:Core.ExpReturns theith argument. -
accept
Description copied from class:AstNodeAccepts a shuttle, calling theShuttle.visit(net.hydromatic.morel.ast.Ast.Literal)method appropriate to the type of this node, and returning the result. -
accept
Description copied from class:AstNodeAccepts a visitor, calling theShuttle.visit(net.hydromatic.morel.ast.Ast.Literal)method appropriate to the type of this node, and returning the result.- Overrides:
acceptin classCore.BaseNode
-
unparse
-
copy
-
isConstant
public boolean isConstant()Description copied from class:Core.ExpReturns whether this expression is a constant.Examples include literals
1,true, constructors applied to constants, records and tuples whose arguments are constant.- Overrides:
isConstantin classCore.Exp
-
isCallTo
Description copied from class:Core.ExpReturns whether this expression is a call to the given built-in.
-