Package icyllis.arc3d.compiler.tree
Class BinaryExpression
java.lang.Object
icyllis.arc3d.compiler.tree.Node
icyllis.arc3d.compiler.tree.Expression
icyllis.arc3d.compiler.tree.BinaryExpression
A binary operation.
-
Nested Class Summary
Nested classes/interfaces inherited from class icyllis.arc3d.compiler.tree.Node
Node.ElementKind, Node.ExpressionKind, Node.StatementKind, Node.SymbolKind
-
Field Summary
-
Method Summary
Modifier and TypeMethodDescriptionstatic @Nullable Expression
convert
(@NonNull Context context, int position, Expression left, Operator op, Expression right) Creates a potentially-simplified form of the expression.@NonNull Expression
copy
(int position) getKind()
getLeft()
getRight()
static @NonNull Expression
make
(@NonNull Context context, int pos, Expression left, Operator op, Expression right, Type resultType) void
setLeft
(Expression left) void
setRight
(Expression right) @NonNull String
toString
(int parentPrecedence) Methods inherited from class icyllis.arc3d.compiler.tree.Expression
accept, copy, getCoercionCost, getConstantValue, getType, isBooleanLiteral, isConstructorCall, isFloatLiteral, isIncomplete, isIntLiteral, isLiteral, toString
Methods inherited from class icyllis.arc3d.compiler.tree.Node
getEndOffset, getStartOffset
-
Method Details
-
convert
public static @Nullable Expression convert(@NonNull Context context, int position, Expression left, Operator op, Expression right) Creates a potentially-simplified form of the expression. Determines the result type programmatically. -
make
public static @NonNull Expression make(@NonNull Context context, int pos, Expression left, Operator op, Expression right, Type resultType) -
getKind
- Specified by:
getKind
in classExpression
- See Also:
-
getLeft
-
getOperator
-
getRight
-
setLeft
-
setRight
-
copy
- Specified by:
copy
in classExpression
-
toString
- Specified by:
toString
in classExpression
-