Class ASTExprOpBinary
java.lang.Object
io.github.protasm.jvmud.compiler.parser.ast.ASTNode
io.github.protasm.jvmud.compiler.parser.ast.ASTExpression
io.github.protasm.jvmud.compiler.parser.ast.expr.ASTExprOpBinary
Binary operator expression, including semantic refinements for context-sensitive LPC operators.
-
Field Summary
-
Constructor Summary
ConstructorsConstructorDescriptionASTExprOpBinary(int line, ASTExpression left, ASTExpression right, BinaryOpType operator) -
Method Summary
Methods inherited from class ASTNode
accept, className, line, setSourceOrder, sourceOrder
-
Constructor Details
-
ASTExprOpBinary
-
-
Method Details
-
left
-
right
-
operator
-
setInferredType
Records the type selected by semantic analysis when an operator is ambiguous without context.For example,
mixed + mixedin an explicit string destination is treated as LPC string concatenation, while the same expression without that expected type remains numeric by default. JVMud uses this for narrow LPMud compatibility idioms such as legacy text efuns that returnmixed, not as a general license to infer arbitrary operator meanings from context.- Parameters:
inferredType- resolved expression type, ornullto fall back to structural inference
-
lpcType
- Specified by:
lpcTypein classASTExpression
-