// ----------------------------------------------------------------------
        // Types
        // ----------------------------------------------------------------------

        public JST.Expression ResolveType(CST.TypeRef typeRef, TypePhase typePhase)
        {
            var groundTypeRef = SubstituteType(typeRef);
            var existing      = default(ExpressionAndPhase);

            if (boundTypes.TryGetValue(groundTypeRef, out existing) && typePhase <= existing.Phase)
            {
                return(existing.Expression);
            }
            else
            {
                return(env.JSTHelpers.DefaultResolveType(this, groundTypeRef, typePhase));
            }
        }
示例#2
0
        // ----------------------------------------------------------------------
        // Types
        // ----------------------------------------------------------------------

        public JST.Expression ResolveType(CST.TypeRef typeRef, TypePhase typePhase)
        {
            var groundTypeRef = SubstituteType(typeRef);
            var res           = default(JST.Expression);

            if (typePhase <= TypePhase.Constructed && boundTypes.TryGetValue(groundTypeRef, out res))
            {
                return(res);
            }
            else
            {
                return(env.JSTHelpers.DefaultResolveType(this, groundTypeRef, TypePhase.Constructed));
            }
        }
 public JST.Expression ResolveType(CST.TypeRef typeRef)
 {
     return(ResolveType(typeRef, TypePhase.Constructed));
 }
示例#4
0
 public Variable(JST.Identifier id, ArgLocal argLocal, bool isInit, bool isReadOnly, CST.TypeRef type)
 {
     Id         = id;
     ArgLocal   = argLocal;
     IsInit     = isInit;
     IsReadOnly = isReadOnly;
     Type       = type;
 }