@@ -72,11 +72,7 @@ public void Reset(string input, int start, SourceType sourceType = SourceType.Sc
7272 => Reset ( input ?? ThrowArgumentNullException < string > ( nameof ( input ) ) , start , input . Length - start , sourceType , sourceFile ) ;
7373
7474 public void Reset ( string input , int start , int length , SourceType sourceType = SourceType . Script , string ? sourceFile = null )
75- {
76- ResetInternal ( input , start , length , sourceType , sourceFile , trackRegExpContext : true ) ;
77- _stringPool = default ;
78- _options . _errorHandler . Reset ( ) ;
79- }
75+ => ResetInternal ( input , start , length , sourceType , sourceFile , _trackRegExpContext ) ;
8076
8177 internal void ResetInternal ( string input , int start , int length , SourceType sourceType , string ? sourceFile , bool trackRegExpContext )
8278 {
@@ -122,6 +118,9 @@ internal void ResetInternal(string input, int start, int length, SourceType sour
122118 _inModule = _strict = sourceType == SourceType . Module ;
123119
124120 _sb = _sb is not null ? _sb . Clear ( ) : new StringBuilder ( ) ;
121+ _stringPool = default ;
122+
123+ _options . _errorHandler . Reset ( ) ;
125124 }
126125
127126 internal void ReleaseLargeBuffers ( )
@@ -165,10 +164,4 @@ internal void ReleaseStringBuilder(ref StringBuilder? sb)
165164 _sb = sb ;
166165 sb = null ;
167166 }
168-
169- internal void MoveTo ( int position , bool expressionAllowed )
170- {
171- ResetInternal ( _input , position , _endPosition - position , _sourceType , _sourceFile , _trackRegExpContext ) ;
172- _expressionAllowed = _trackRegExpContext && expressionAllowed ;
173- }
174167}
0 commit comments