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 Expressionconvert(@NonNull Context context, int position, Expression left, Operator op, Expression right) Creates a potentially-simplified form of the expression.@NonNull Expressioncopy(int position) getKind()getLeft()getRight()static @NonNull Expressionmake(@NonNull Context context, int pos, Expression left, Operator op, Expression right, Type resultType) voidsetLeft(Expression left) voidsetRight(Expression right) @NonNull StringtoString(int parentPrecedence) Methods inherited from class icyllis.arc3d.compiler.tree.Expression
accept, copy, getCoercionCost, getConstantValue, getType, isBooleanLiteral, isConstructorCall, isFloatLiteral, isIncomplete, isIntLiteral, isLiteral, toStringMethods 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:
getKindin classExpression- See Also:
-
getLeft
-
getOperator
-
getRight
-
setLeft
-
setRight
-
copy
- Specified by:
copyin classExpression
-
toString
- Specified by:
toStringin classExpression
-