コード例 #1
0
 public ResTypeVarRef(
     SourceRange range,
     IResTypeParamDecl varDecl)
 {
     _range = range;
     _varDecl = varDecl;
 }
コード例 #2
0
 public ResTypeParamRef(
     SourceRange range,
     IResTypeParamDecl decl)
 {
     _range = range;
     _decl  = decl;
 }
コード例 #3
0
ファイル: ResTypeVarRef.cs プロジェクト: kzyg/spark
 public ResTypeVarRef(
     SourceRange range,
     IResTypeParamDecl varDecl)
 {
     _range   = range;
     _varDecl = varDecl;
 }
コード例 #4
0
        public MidType Lookup(IResTypeParamDecl key)
        {
            MidType value;

            if (_types.TryGetValue(key, out value))
            {
                return(value);
            }

            if (_parent != null)
            {
                return(_parent.Lookup(key));
            }

            throw new KeyNotFoundException();
        }
コード例 #5
0
ファイル: Substitution.cs プロジェクト: kzyg/spark
        public IResTypeExp Lookup(IResTypeParamDecl var, SourceRange range)
        {
            Func <SourceRange, IResTypeExp> gen;

            if (_typeVars.TryGetValue(var, out gen))
            {
                return(gen(range));
            }

            if (_base != null)
            {
                return(_base.Lookup(var, range));
            }

            return(new ResTypeVarRef(range, var));
        }
コード例 #6
0
 public void Insert(IResTypeParamDecl key, MidType value)
 {
     _types[key] = value;
 }
コード例 #7
0
ファイル: Substitution.cs プロジェクト: kzyg/spark
 public void Insert(IResTypeParamDecl var, Func <SourceRange, IResTypeExp> gen)
 {
     _typeVars[var] = gen;
 }