18 using System.Collections.Generic;
22 using ErrorManagement;
26 #region TernaryOperator
82 get {
return operand1; }
83 set { this.operand1 = value; }
91 get {
return operand2; }
92 set { this.operand2 = value; }
100 get {
return operand3; }
101 set { this.operand3 = value; }
129 this.operand1 = operand1;
130 this.operand2 = operand2;
131 this.operand3 = operand3;
147 return v.Visit(
this, o);
Abstract class encapsulate a programming language expression.
Expression FirstOperand
Gets the first operand of the ternary expression
override Object Accept(Visitor v, Object o)
Accept method of a concrete visitor.
This class encapsulates a location in a specific file. Implements an Inmutable pattern. So it can be used in any context, that is his internal fields never change.
TernaryExpression(Expression operand1, Expression operand2, Expression operand3, TernaryOperator op, Location location)
Constructor of TernaryExpression
Encapsulates a ternary expression of our programming language.
Location location
Location: Encapsulates in one object the line, column and filename
Expression ThirdOperand
Gets the third operand of the ternary expression
Expression SecondOperand
Gets the second operand of the ternary expression
TernaryOperator Operator
Gets the operator of the ternary expression
TernaryOperator
Ternary operators