Package icyllis.arc3d.compiler.tree
Class ConstructorCall
java.lang.Object
icyllis.arc3d.compiler.tree.Node
icyllis.arc3d.compiler.tree.Expression
icyllis.arc3d.compiler.tree.ConstructorCall
- Direct Known Subclasses:
ConstructorArray
,ConstructorArrayCast
,ConstructorCompound
,ConstructorCompoundCast
,ConstructorDiagonalMatrix
,ConstructorMatrixResize
,ConstructorScalarCast
,ConstructorStruct
,ConstructorVectorSplat
Base class representing a constructor call: type_name( args, ... ).
- See Also:
-
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
ModifierConstructorDescriptionprotected
ConstructorCall
(int position, Type type, Expression[] arguments) -
Method Summary
Modifier and TypeMethodDescriptionboolean
accept
(TreeVisitor visitor) Visit this AST with a given visitor.static Expression
convert
(Context context, int pos, Type type, List<Expression> args) final Expression
final @Unmodifiable Expression[]
final Type
getConstantValue
(int i) Returns the i'th compile-time constant value within a literal or constructor.final boolean
toString
(int parentPrecedence) Methods inherited from class icyllis.arc3d.compiler.tree.Expression
clone, clone, getCoercionCost, getKind, getType, isBooleanLiteral, isFloatLiteral, isIncomplete, isIntLiteral, isLiteral, toString
Methods inherited from class icyllis.arc3d.compiler.tree.Node
getEndOffset, getStartOffset
-
Constructor Details
-
ConstructorCall
-
-
Method Details
-
convert
@Nullable public static Expression convert(@Nonnull Context context, int pos, @Nonnull Type type, @Nonnull List<Expression> args) -
accept
Description copied from class:Node
Visit this AST with a given visitor. -
isConstructorCall
public final boolean isConstructorCall()- Overrides:
isConstructorCall
in classExpression
-
getComponentType
-
getArgument
-
getArguments
-
getConstantValue
Description copied from class:Expression
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)- Overrides:
getConstantValue
in classExpression
-
toString
- Specified by:
toString
in classExpression
-