public override void Visit(UnaryOperator unaryOperator) { if (unaryOperator.Operator == Enum.GetName(typeof(Symbol), Symbol.EXCLAMATION)) { unaryOperator.term.Accept(this); var boolType = _stateInfo.currentType; if (boolType.TypeName != Enum.GetName(typeof(Keyword), Keyword.BOOL).ToLower()) { throw new Exception("Cannot Apply negation operator to " + boolType.ToString() + " type"); } } else { unaryOperator.term.Accept(this); } }
public override void Visit(UnaryOperator unaryOperator) { }
public virtual void Visit(UnaryOperator unaryOperator) { }