Пример #1
0
        internal static DimSpecNode DimSpec(int count, Symbol s)
        {
            DimSpecNode res = new DimSpecNode();

            res.kind  = Kind.DimSpecifier;
            res.start = s.pos;
            res.end   = s.endpos;
            res.count = count;
            return(res);
        }
Пример #2
0
        internal static TypeExprNode TypeExpr(ExprNode expr, DimSpecNode spec, Symbol s)
        {
            TypeExprNode res = new TypeExprNode();

            res.kind  = Kind.DimmedExpr;
            res.start = s.pos;
            res.end   = s.endpos;
            res.expr  = expr;
            res.spec  = spec;
            return(res);
        }
Пример #3
0
        internal static ArrayType ArrayType(TypeNode parent, DimSpecNode dim, Symbol s)
        {
            ArrayType res = new ArrayType();

            res.kind   = Kind.ArrayType;
            res.start  = s.pos;
            res.end    = s.endpos;
            res.parent = parent;
            res.dim    = dim;
            return(res);
        }
Пример #4
0
 internal static ArrayType OneArrayType(TypeNode parent, DimSpecNode dim, Symbol s)
 {
     if (parent.kind != Kind.ArrayType)
     {
         return(ArrayType(parent, dim, s));
     }
     else
     {
         ArrayType p = (ArrayType)parent;
         while (p.parent.kind == Kind.ArrayType)
         {
             p = (ArrayType)p.parent;
         }
         p.parent = Make.ArrayType(p.parent, dim, s);
         return((ArrayType)parent);
     }
 }
Пример #5
0
 internal static TypeExprNode TypeExpr( ExprNode expr, DimSpecNode spec, Symbol s )
 {
     TypeExprNode res = new TypeExprNode();
     res.kind = Kind.DimmedExpr;
     res.start = s.pos;
     res.end = s.endpos;
     res.expr = expr;
     res.spec = spec;
     return res;
 }
Пример #6
0
 internal static ArrayType OneArrayType( TypeNode parent, DimSpecNode dim, Symbol s )
 {
     if( parent.kind != Kind.ArrayType )
         return ArrayType( parent, dim, s );
     else {
         ArrayType p = (ArrayType)parent;
         while( p.parent.kind == Kind.ArrayType )
             p = (ArrayType)p.parent;
         p.parent = Make.ArrayType( p.parent, dim, s );
         return (ArrayType)parent;
     }
 }
Пример #7
0
 internal static DimSpecNode DimSpec( int count, Symbol s )
 {
     DimSpecNode res = new DimSpecNode();
     res.kind = Kind.DimSpecifier;
     res.start = s.pos;
     res.end = s.endpos;
     res.count = count;
     return res;
 }
Пример #8
0
 internal static ArrayType ArrayType( TypeNode parent, DimSpecNode dim, Symbol s )
 {
     ArrayType res = new ArrayType();
     res.kind = Kind.ArrayType;
     res.start = s.pos;
     res.end = s.endpos;
     res.parent = parent;
     res.dim = dim;
     return res;
 }