Exemplo n.º 1
0
 public AssignExprNode SimplifyComplexAssignment()
 {
     if (this.Operator is ComplexAssignOpNode && this.Operator.Symbol.Length > 1)
     {
         string part     = this.Operator.Symbol.Substring(0, this.Operator.Symbol.IndexOf('='));
         var    expanded = new ArithmExprNode(this.Line,
                                              this.LeftOperand,
                                              ArithmOpNode.FromSymbol(this.Operator.Line, part),
                                              this.RightOperand
                                              );
         return(new AssignExprNode(this.Line, this.LeftOperand, expanded));
     }
     return(this);
 }
Exemplo n.º 2
0
 public ArithmExprNode(int line, ExprNode left, ArithmOpNode @operator, ExprNode right)
     : base(line, left, @operator, right)
 {
 }