Package net.hydromatic.morel.ast
Class Core.Exp
java.lang.Object
net.hydromatic.morel.ast.AstNode
net.hydromatic.morel.ast.Core.BaseNode
net.hydromatic.morel.ast.Core.Exp
- Direct Known Subclasses:
Core.Apply,Core.Case,Core.Fn,Core.From,Core.Id,Core.Let,Core.Literal,Core.Local,Core.RecordSelector,Core.Tuple
- Enclosing class:
Core
Base class of core expressions.
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionabstract Core.ExpAccepts a shuttle, 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.voidforEachArg(ObjIntConsumer<Core.Exp> action) booleanReturns whether this expression is a call to the given built-in.booleanReturns whether this expression is a constant.type()Returns the type.Methods inherited from class net.hydromatic.morel.ast.Core.BaseNode
accept
-
Field Details
-
type
-
-
Constructor Details
-
Exp
-
-
Method Details
-
forEachArg
-
arg
Returns theith argument. -
type
Returns the type. -
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.- Overrides:
acceptin classCore.BaseNode
-
isConstant
public boolean isConstant()Returns whether this expression is a constant.Examples include literals
1,true, constructors applied to constants, records and tuples whose arguments are constant. -
isCallTo
Returns whether this expression is a call to the given built-in.
-