Skip to content

Commit d3a34f8

Browse files
perf(linter/plugins): optimize getTokens() and other methods (#16188)
- Removes branching in some cases where it was used to calculate slices. - Avoids indexing into arrays past their length. - Renames `nodeTokens` to `tokenList`. In the first few methods implemented, they contained tokens of the given node. Not the case for later methods, but the misnomer stayed. - Improves consistency in comments. Clarifies that binary searches yield tokens before or after a certain point, they are not necessarily _within_ the range we care about. --------- Co-authored-by: overlookmotel <[email protected]>
1 parent abdbba7 commit d3a34f8

File tree

1 file changed

+208
-187
lines changed

1 file changed

+208
-187
lines changed

0 commit comments

Comments
 (0)