/// <summary> /// Creates a new variable scope. /// </summary> /// <returns> /// A <see cref="IDisposable" /> handle that will return to the previous scope when disposed. /// </returns> internal IDisposable NewScope() { _current = new VariableScope(_current); return(new ScopeHandle(() => _current = _current?.Parent)); }
/// <summary> /// Initializes a new instance of the <see cref="VariableScopeStack" /> class. /// </summary> internal VariableScopeStack() { _current = new VariableScope(s_emptyParameters); }