private void CheckAndCastOperands() { if (this.expr == null || this.refference == null) { return; } Symatic.PostfixOperator t_op = Symatic.PostfixOperator.DOT; switch (this.op.type) { case Token.Type.OP_REF: t_op = Symatic.PostfixOperator.REF; break; case Token.Type.OP_DOT: t_op = Symatic.PostfixOperator.DOT; break; case Token.Type.LBRACKET: t_op = Symatic.PostfixOperator.INDEX; break; default: throw new NotImplementedException(); } Symatic.BinaryConvertResult res = Symatic .PostfixConvertResult(this.expr, this.refference, t_op); this.type = res.type; this.lvalue = res.lvalue; }
public override Expression Modified() { Symatic.BinaryConvertResult res = Symatic.ConvertBinaryOperands(this.left_operand, this.right_operand, this.op); this.left_operand = res.left.Modified(); this.right_operand = res.right.Modified(); this.op = res.op; return(this); }
private void CheckAndCastOperands() { if (this.left_operand == null || this.right_operand == null) { return; } Symatic.BinaryConvertResult res = Symatic .ConvertBinaryOperands(this.left_operand, this.right_operand, this.op); this.type = res.type; this.lvalue = res.lvalue; }