public ResVarSpec( IResVarDecl decl, IResTypeExp type) { _decl = decl; _type = type; }
public ResPipelineScope( IResContainerRef pipeline, IResVarDecl thisParameter) { _pipeline = pipeline; _thisParameter = thisParameter; }
public ResVarRef( SourceRange range, IResVarDecl varDecl, IResTypeExp type) : base(range, type) { _varDecl = varDecl; }
public ResForExp( SourceRange range, IResVarDecl var, IResExp sequence, IResExp body) : base(range, new ResVoidType()) { _var = var; _sequence = sequence; _body = body; }
public ResLetExp( SourceRange range, IResVarDecl var, IResExp value, IResExp body) : base(range, body.Type) { _var = var; _value = value; _body = body; }
public MidVal Lookup(SourceRange range, IResVarDecl key) { Func <SourceRange, MidVal> generator; if (_values.TryGetValue(key, out generator)) { return(generator(range)); } if (_parent != null) { return(_parent.Lookup(range, key)); } throw new KeyNotFoundException(); }
public IResExp Lookup(IResVarDecl var, SourceRange range) { var subst = this; while (subst != null) { Func <SourceRange, Substitution, IResExp> gen; if (subst._vars.TryGetValue(var, out gen)) { return(gen(range, this)); } subst = subst._base; } return(new ResVarRef(range, var, var.Type.Substitute(this))); }
public void Insert(IResVarDecl key, Func <SourceRange, IResExp> gen) { _vars[key] = (r, subst) => gen(r); }
public ResVarRef( SourceRange range, IResVarDecl varDecl) : this(range, varDecl, varDecl.Type) { }
public ResVarSpec( IResVarDecl decl, IResMemberTerm memberTerm) : this(decl, decl.Type.Substitute(memberTerm.Subst)) { }
public ResVarSpec( IResVarDecl decl, IResTypeExp type ) { _decl = decl; _type = type; }
public void Insert(IResVarDecl key, IResVarDecl value) { _vars[key] = (r, subst) => new ResVarRef(r, value, value.Type.Substitute(subst)); }
public static bool IsImplicit( this IResVarDecl decl) { return(decl.Flags.HasFlag(ResVarFlags.Implicit)); }
public void Insert(IResVarDecl key, Func <SourceRange, MidVal> value) { _values[key] = value; }