internal RTExecutionError(RTScope func, RTErrorCode errCode, string errMsg) : base(func.Creator.SourceStartIndex, func.Creator.SourceEndIndex, errCode, errMsg) { this.FunctionName = func.FunctionName; }
/// <summary> /// Deep copy this instance. /// </summary> /// <returns>A clone.</returns> private RTScope Duplicate() { RTScope scope = new RTScope(); scope.Creator = this.Creator; scope._argCount = this._argCount; if (_slots != null) foreach (var pair in this._slots) { scope.SetValueLocal(pair.Key, pair.Value); } return scope; }
public void PushScope(RTScope scope) { scope.Parent = CurrentScope; _scopes.Push(scope); _currentScope = scope; if (scope.Parent == null) { _rootScope = scope; InitRootScope(); } }
public RTScope PopScope() { var scope = _scopes.Pop(); _currentScope = scope.Parent; scope.Parent = null; return scope; }
public override object Execute(RTExecutionContext context) { var scope = new RTScope(this); var retval = scope.Execute(context); if (!Metadata.HasReturnValue) { retval = RTVoid.Singleton; } return retval; }