예제 #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);
        }
예제 #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);
        }