mirror of
https://github.com/microsoft/TypeScript.git
synced 2026-05-19 01:33:15 -05:00
Merge pull request #16664 from amcasey/TokenWorker
Short-circuit getTokenAtPositionWorker
This commit is contained in:
@@ -649,7 +649,8 @@ namespace ts {
|
||||
|
||||
const start = allowPositionInLeadingTrivia ? child.getFullStart() : child.getStart(sourceFile, includeJsDocComment);
|
||||
if (start > position) {
|
||||
continue;
|
||||
// If this child begins after position, then all subsequent children will as well.
|
||||
break;
|
||||
}
|
||||
|
||||
const end = child.getEnd();
|
||||
|
||||
Reference in New Issue
Block a user