public ResTypeVarRef( SourceRange range, IResTypeParamDecl varDecl) { _range = range; _varDecl = varDecl; }
public ResTypeParamRef( SourceRange range, IResTypeParamDecl decl) { _range = range; _decl = decl; }
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(); }
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)); }
public void Insert(IResTypeParamDecl key, MidType value) { _types[key] = value; }
public void Insert(IResTypeParamDecl var, Func <SourceRange, IResTypeExp> gen) { _typeVars[var] = gen; }