public MidFieldMemberRef( MidVal obj, MidFieldDecl decl) { _obj = obj; _decl = decl; }
public MidElementCtorArg( MidAttributeDecl attribute, MidVal val) { _attribute = attribute; _val = val; }
private MidExp EmitExpImpl( ResLetExp resLet, MidEmitEnv env) { var resLetType = resLet.Var.Type; MidVal midVal = null; if (resLetType is ResFreqQualType) { var resFreq = ((ResFreqQualType)resLetType).Freq; var midElem = ((MidElementType)EmitTypeExp(resFreq, env)).Decl; midVal = EmitValToElement(resLet.Value, midElem, env); } if (midVal == null) { midVal = EmitVal(resLet.Value, env); } env.Insert( resLet.Var, (SourceRange r) => midVal); return(EmitExpRaw( resLet.Body, env)); }
private MidExp EmitExpImpl(ResBreakExp exp, MidEmitEnv env) { MidLabel label = env.Lookup(exp.Label); MidVal val = EmitVal(exp.Value, env); return(new MidBreakExp(exp.Range, label, val)); }
public MidMemberBind( MidVal obj, MidMemberDecl decl) { _obj = obj; _decl = decl; }
public MidVal Transform(MidVal exp) { var e = (MidVal)PreTransform(exp); TransformChildren(e); e = (MidVal)PostTransform(e); return(e); }
public MidSwitchExp( MidVal value, IEnumerable <MidCase> cases, SourceRange range) : base(range, new MidVoidType()) { _value = value; _cases = cases.ToArray(); }
public MidCase( MidVal value, MidExp body, SourceRange range) { this.Value = value; this.Body = body; _range = range; }
public MidAssignExp( SourceRange range, MidVal dest, MidVal src) : base(range, new MidVoidType()) { _dest = dest; _src = src; }
public MidBreakExp( SourceRange range, MidLabel label, MidVal value) : base(range, new MidVoidType()) { _label = label; _value = value; }
private IMidMemberRef LookupMemberImpl( IMidMemberRef container, MidVal obj, IResMemberDecl resDecl, MidEmitEnv env) { var midDecl = container.LookupMemberDecl(resDecl); return(midDecl.CreateRef(new MidMemberBind(obj, midDecl))); }
public MidIfExp( MidVal condition, MidExp thenExp, MidExp elseExp, SourceRange range) : base(range, new MidDummyType()) { this.Condition = condition; this.Then = thenExp; this.Else = elseExp; }
public MidForExp( SourceRange range, MidVar var, MidVal seq, MidExp body) : base(range, new MidVoidType()) { _var = var; _seq = seq; _body = body; }
public void Insert(MidVar var, MidVal val) { _vars[var] = val; }
private void TransformChildrenImpl( MidVal val) { }
private MidVal Replace( MidVal val) { return(ReplaceImpl((dynamic)val)); }