Exemplo n.º 1
0
Arquivo: Code.cs Projeto: Silica/CsPSL
 public bool Run(Environment env, Scope scope)
 {
     int size = code.Count();
     while (scope.line < size)
     {
         var r = code[scope.line++].Execute(env);
         if (r == ReturnCode.None)
             continue;
         if (r == ReturnCode.Yield)
             return false;
         return true;
     }
     env.endScope();
     return true;
 }
Exemplo n.º 2
0
 public void AddScope(Scope s)
 {
     s.Set(scope);
     scope = s;
 }
Exemplo n.º 3
0
 public void endScope()
 {
     scope = scope.End();
 }
Exemplo n.º 4
0
 public void Set(Scope s)
 {
     next = s;
 }