public override bool Visit(AstExpressionList node)
 {
     ErrorIfIsNull(node.Expr);
     return true;
 }
Ejemplo n.º 2
0
        // #ASSIGN_STATEMENT ID #ARRAY ASSIGNMENT #EXPRESSION
        private void ConstructAssignArrayStatement()
        {
            var newValue = nodes.Pop() as AstExpression;

            List<AstArrayIndex> indices = new List<AstArrayIndex>();

            while (nodes.Peek() is AstArrayIndex)
            {
                indices.Insert(0, nodes.Pop() as AstArrayIndex);
            }
            AstExpressionList index = new AstExpressionList(indices.ToArray());
            var id = nodes.Pop() as AstIdExpression;
            var idArrExpression = new AstIdArrayExpression(id.Id, index);
            idArrExpression.SetTextPosition( tokenCurrPosition );
            var node = new AstAssignStatement(idArrExpression, newValue);
            PushNode(node);
        }
Ejemplo n.º 3
0
 public override bool Visit(AstExpressionList node)
 {
     // TODO: check
     return true;
 }
Ejemplo n.º 4
0
        // #SIMPLE_TERM ID #ARRAY
        private void ConstructArrayUseSimpleTerm()
        {
            var indices = new List<AstArrayIndex>();
            var curr = nodes.Peek() as AstNode;
            while (curr is AstArrayIndex)
            {
                nodes.Pop();
                indices.Insert(0, curr as AstArrayIndex);
                curr = nodes.Peek() as AstNode;
            }

            var index = new AstExpressionList(indices.ToArray());

            var id = nodes.Pop() as AstIdExpression;

            var idArr = new AstIdArrayExpression(id.Id, index);
            idArr.SetTextPosition( tokenCurrPosition );
            var node = new AstSimpleTermExpr(idArr);
            PushNode(node);
        }
Ejemplo n.º 5
0
        public override bool Visit(AstExpressionList node)
        {
            m_indexVars.Push(new List<string>());
            foreach (var e in node.Expr)
            {
                e.Accept(this);
                m_indexVars.Peek().Add(m_currentIndex.Last());
                m_currentIndex.Clear();
            }

            m_lastIndex = m_indexVars.Pop();

            return true;
        }
 public override bool Visit(AstExpressionList node)
 {
     return true;
 }
Ejemplo n.º 7
0
 public override bool Visit(AstExpressionList node)
 {
     AstIdArrayExpression expr = Stack.Peek() as AstIdArrayExpression;
     AstExpressionList listSrc = expr.Index as AstExpressionList;
     Symbol array = table.Lookup(expr.Id);
     // TODO
     return true;
 }
Ejemplo n.º 8
0
 public abstract bool Visit(AstExpressionList node);