Exemplo n.º 1
0
        /// <summary>
        /// Checks the static semantic constraints of an IOReadNode.
        /// </summary>
        /// <returns>An void.</returns>
        /// <param name="node">Node.</param>
        public void VisitIOReadNode(IOReadNode node)
        {
            foreach (Evaluee idNode in node.IDNodes)
            {
                idNode.Accept(this);
                TokenType type = idNode.EvaluationType;

                if (type == TokenType.ERROR)
                {
                    analyzer.notifyError(new UninitializedVariableError(node));
                }
                else if (type == TokenType.TYPE_ARRAY || type == TokenType.BOOLEAN_VAL)
                {
                    analyzer.notifyError(new IllegalTypeError(idNode));
                }

                idNode.Scope.GetProperty(idNode.VariableID).Assigned = true;
            }
        }
Exemplo n.º 2
0
 public void VisitIOReadNode(IOReadNode node)
 {
 }