Beispiel #1
0
 private void Init() {
   Parser = new Parser(Language);
   //Create static scopes
   MainScope = new Scope(DataMap.MainModule.ScopeInfo, null, null, null);
   StaticScopes = new Scope[DataMap.StaticScopeInfos.Count];
   StaticScopes[0] = MainScope;
   Globals = MainScope.AsDictionary();
 }
 public void PopScope() {
   CurrentScope = CurrentScope.Caller;
 }
 public void PushClosureScope(ScopeInfo scopeInfo, Scope closureParent, object[] parameters) {
   CurrentScope = new Scope(scopeInfo, CurrentScope, closureParent, parameters);
 }
 public void PushScope(ScopeInfo scopeInfo, object[] parameters) {
   CurrentScope = new Scope(scopeInfo, CurrentScope, CurrentScope, parameters);
 }
 public ScriptThread(ScriptApp app) {
   App = app;
   Runtime = App.Runtime;
   CurrentScope = app.MainScope;
 }
Beispiel #6
0
    private Scope _parent; //computed on demand

    public Scope(ScopeInfo scopeInfo, Scope caller, Scope creator, object[] parameters) : base(scopeInfo) {
      Caller = caller;
      Creator = creator; 
      Parameters = parameters;
    }