public SimpleExpressionTail(Token token, TokenType operation, TermNode term, SimpleExpressionTail tail, Scope scope) : base(token, scope) { this.operation = operation; this.term = term; this.tail = tail; }
public SimpleExpression(Token token, TermNode term, SimpleExpressionTail tail, bool additiveInverse, Scope scope) : base(token, scope) { this.term = term; this.tail = tail; this.additiveInverse = additiveInverse; this.evaluationType = TokenType.UNDEFINED; }
public void VisitSimpleExpressionTail(SimpleExpressionTail node) { if (node.HasAlreadyBeenEvaluated) { return; } node.Term.Accept(this); TokenType termEval = node.Term.EvaluationType; if (node.Tail != null) { node.Tail.Accept(this); TokenType tailEval = node.Tail.EvaluationType; if (!LegitOperationChecker.IsLegitOperationForEvaluations(node.Tail.Operation, termEval, tailEval)) { termEval = TokenType.ERROR; } } node.EvaluationType = termEval; }
public void VisitSimpleExpressionTail(SimpleExpressionTail node) { node.Accept(this.typeChecker); node.Term.Accept(this); }