Commit d3a34f8
perf(linter/plugins): optimize
- 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]>getTokens() and other methods (#16188)1 parent abdbba7 commit d3a34f8
1 file changed
+208
-187
lines changed
0 commit comments