Skip to content

Commit 3978f50

Browse files
authored
Remove old parser clears (microsoft#827)
1 parent 38d5634 commit 3978f50

File tree

1 file changed

+0
-5
lines changed

1 file changed

+0
-5
lines changed

internal/parser/parser.go

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -209,7 +209,6 @@ func (p *Parser) initializeState(fileName string, path tspath.Path, sourceText s
209209
default:
210210
p.contextFlags = ast.NodeFlagsNone
211211
}
212-
p.hasParseError = false
213212
p.scanner.SetText(p.sourceText)
214213
p.scanner.SetOnError(p.scanError)
215214
p.scanner.SetScriptTarget(p.languageVersion)
@@ -335,8 +334,6 @@ func (p *Parser) parseSourceFileWorker() *ast.SourceFile {
335334
p.finishSourceFile(result, isDeclarationFile)
336335
}
337336
}
338-
p.jsdocCache = nil
339-
p.possibleAwaitSpans = []int{}
340337
collectExternalModuleReferences(result)
341338
return result
342339
}
@@ -358,8 +355,6 @@ func (p *Parser) finishSourceFile(result *ast.SourceFile, isDeclarationFile bool
358355
result.TextCount = p.factory.TextCount()
359356
result.IdentifierCount = p.identifierCount
360357
result.SetJSDocCache(p.jsdocCache)
361-
p.jsdocCache = nil
362-
p.identifiers = nil
363358
}
364359

365360
func (p *Parser) parseToplevelStatement(i int) *ast.Node {

0 commit comments

Comments
 (0)