Skip to content

Optimized version of parenthesized_ranges #21510

@sharkdp

Description

@sharkdp

Rewrite (if possible) or provide alternatives to parenthesized_range and parentheses_iterator that take &Tokens as arguments instead of the CommentRanges, and don't use SimpleTokenizer or BackwardsTokenizer at all.

The ultimate goal of this would be to optimize calls sites such as this one in ty (which uses parentheses_iterator).

Suggested by @MichaReiser here: #21476 (comment)

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions