Package icyllis.arc3d.compiler.tree
Class Expression
java.lang.Object
icyllis.arc3d.compiler.tree.Node
icyllis.arc3d.compiler.tree.Expression
- Direct Known Subclasses:
BinaryExpression
,ConditionalExpression
,ConstructorCall
,FieldAccess
,FunctionCall
,FunctionReference
,IndexExpression
,Literal
,Poison
,PostfixExpression
,PrefixExpression
,Swizzle
,TypeReference
,VariableReference
Abstract superclass of all expressions.
-
Nested Class Summary
Nested classes/interfaces inherited from class icyllis.arc3d.compiler.tree.Node
Node.ElementKind, Node.ExpressionKind, Node.StatementKind, Node.SymbolKind
-
Field Summary
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionfinal Expression
clone()
Returns a deep copy at the same position.abstract Expression
clone
(int position) final long
getCoercionCost
(Type other) getConstantValue
(int i) Returns the i'th compile-time constant value within a literal or constructor.abstract Node.ExpressionKind
getKind()
getType()
final boolean
boolean
final boolean
final boolean
isIncomplete
(Context context) Returns true if this expression is incomplete.final boolean
boolean
final String
toString()
Returns a description of the expression.abstract String
toString
(int parentPrecedence) Methods inherited from class icyllis.arc3d.compiler.tree.Node
accept, getEndOffset, getStartOffset
-
Constructor Details
-
Expression
-
-
Method Details
-
getKind
- See Also:
-
getType
-
isConstructorCall
public boolean isConstructorCall() -
isLiteral
public boolean isLiteral() -
isIntLiteral
public final boolean isIntLiteral() -
isFloatLiteral
public final boolean isFloatLiteral() -
isBooleanLiteral
public final boolean isBooleanLiteral() -
getCoercionCost
- See Also:
-
isIncomplete
Returns true if this expression is incomplete. Specifically, dangling function/method-call references that were never invoked, or type references that were never constructed, are considered incomplete expressions and should result in an error. -
getConstantValue
Returns the i'th compile-time constant value within a literal or constructor. Indices which do not contain compile-time constant values will return empty. `vec4(1, vec2(2), 3)` contains four compile-time constants: (1, 2, 2, 3) `mat2(f)` contains four slots, and two are constant: (empty, 0, 0, empty) -
clone
Returns a deep copy at the same position. -
clone
-
toString
Returns a description of the expression. -
toString
-