public void VisitFactorNode(Factor node) { node.Accept(this.typeChecker); FactorMain main = node.FactorMain; FactorTail tail = node.FactorTail; main.Accept(this); if (tail != null) { tail.Accept(this); if (tail.Token.Type == TokenType.SIZE && main.Variable) { VariableIdNode idNode = (VariableIdNode)main.Evaluee; TokenType idEval = idNode.Scope.GetProperty(idNode.ID).GetTokenType(); if (idEval != TokenType.TYPE_ARRAY) { analyzer.notifyError(new IllegalTypeError(tail)); } } } }
public void VisitFactorTail(FactorTail node) { node.Accept(this.typeChecker); }
public Factor(Token token, Scope scope, FactorMain main, FactorTail tail = null) : base(token, scope) { this.main = main; this.tail = tail; }
public void VisitFactorTail(FactorTail node) { }