Ejemplo n.º 1
0
 /// <summary>
 /// Ends the scope.
 /// </summary>
 /// <param name="scope">The scope.</param>
 public void EndScope(ParseScope scope)
 {
     if (scope != this.Scope)
     {
         throw new NotSupportedException();
     }
     scopeStack.Pop();
 }
Ejemplo n.º 2
0
 /// <summary>
 /// Initializes a new instance of the <see cref="ParseScope"/> class.
 /// </summary>
 /// <param name="parent">The parent scope.</param>
 public ParseScope(ParseScope parent)
 {
     this.parent = parent;
 }
Ejemplo n.º 3
0
 /// <summary>
 /// Begins a new scope.
 /// </summary>
 /// <param name="isChild">if set to <c>true</c> the scope is a child.</param>
 /// <returns>A new scope.</returns>
 public ParseScope BeginScope(bool isChild)
 {
     ParseScope result;
     if (isChild)
     {
         result = new ParseScope(this.Scope);
     }
     else
     {
         result = new ParseScope();
     }
     scopeStack.Push(result);
     return result;
 }