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
,ConstructorDiagonal
,ConstructorMatrixResize
,ConstructorScalarCast
,ConstructorSplat
,ConstructorStruct
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
ConstructorsModifierConstructorDescriptionprotected
ConstructorCall
(int position, Type type, Expression[] arguments) -
Method Summary
Modifier and TypeMethodDescriptionstatic @Nullable Expression
convert
(@NonNull Context context, int pos, @NonNull Type type, @NonNull List<Expression> args) final Expression
final @Unmodifiable Expression[]
final Type
@NonNull OptionalDouble
getConstantValue
(int i) Returns the i'th compile-time constant value within a literal or constructor.final boolean
@NonNull String
toString
(int parentPrecedence) Methods inherited from class icyllis.arc3d.compiler.tree.Expression
accept, copy, copy, 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
public static @Nullable Expression convert(@NonNull Context context, int pos, @NonNull Type type, @NonNull List<Expression> args) -
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
-