public MidFieldRef FieldRef( SourceRange range, MidPath obj, MidFieldDecl decl) { return((MidFieldRef)_fieldRefs.Get(obj).Get(decl).Cache( () => new MidFieldRef(range, obj, decl))); }
public MidAttributeFetch AttributeFetch( SourceRange range, MidPath obj, MidAttributeDecl attribute) { return((MidAttributeFetch)_attrFetches.Get(obj).Get(attribute).Cache( () => new MidAttributeFetch(range, obj, attribute, _lazyFactory))); }
public MidFieldRef( SourceRange range, MidPath obj, MidFieldDecl decl) : base(range, decl.Type) { _obj = obj; _decl = decl; }
public MidAttributeFetch( SourceRange range, MidPath obj, MidType type, ILazy <MidAttributeDecl> attribute) : base(range, new MidDummyType()) { _obj = obj; _type = Lazy.Value(type); _attribute = attribute; }
public MidAttributeFetch( SourceRange range, MidPath obj, MidAttributeDecl attribute, ILazyFactory lazyFactory) : base(range, new MidDummyType()) { _obj = obj; _type = lazyFactory.New(() => _attribute.Value.Type); _attribute = Lazy.Value(attribute); }
private MidExp TryFoldPath( MidVar var, MidExp exp, MidPath path) { if (exp is MidFieldRef) { var midFieldRef = (MidFieldRef)exp; if (midFieldRef.Obj is MidVarRef) { var midVarRef = (MidVarRef)midFieldRef.Obj; if (midVarRef.Var == var) { midFieldRef.Obj = path; return(midFieldRef); } } } return(exp); }