Ejemplo n.º 1
0
        // Array Aggregates
        public int VisitMultipleArrayAggregate(MultipleArrayAggregate ast, Frame frame)
        {
            var elemSize  = ast.Expression.Visit(this, frame);
            var frame1    = frame.Expand(elemSize);
            var arraySize = ast.ArrayAggregate.Visit(this, frame1);

            return(elemSize + arraySize);
        }
Ejemplo n.º 2
0
        public TypeDenoter VisitMultipleArrayAggregate(MultipleArrayAggregate ast, Void arg)
        {
            var expressionType = ast.Expression.Visit(this);
            var elemType       = ast.ArrayAggregate.Visit(this);

            CheckAndReportError(expressionType.Equals(elemType), "incompatible array-aggregate element",
                                ast.Expression);
            return(elemType);
        }