示例#1
0
文件: Codelet.cs 项目: Spicery/Nutmeg
 public override Runlet Weave(Runlet continuation, GlobalDictionary g)
 {
     if (this.Scope == "global")
     {
         Ident ident = g.Get(Name);
         if (this.Reftype == "get")
         {
             return(new PushIdentRunlet(ident, continuation));
         }
         else
         {
             throw new UnimplementedNutmegException();
         }
     }
     else if (this.Scope == "local" && this.Slot >= 0)
     {
         if (this.Reftype == "get")
         {
             return(new PushSlotRunlet(this.Slot, continuation));
         }
         else
         {
             throw new UnimplementedNutmegException();
         }
     }
     else
     {
         throw new UnimplementedNutmegException();
     }
 }
示例#2
0
 public PushIdentRunlet(Ident ident, Runlet next) : base(next)
 {
     this._ident = ident;
 }
示例#3
0
 public PopGlobalRunlet(Ident ident, Runlet next) : base(next)
 {
     this._ident = ident;
 }