ruff/crates/ruff_python_formatter/src/expression
Dhruv Manilawala 549cc1e437
Build CommentRanges outside the parser (#11792)
## Summary

This PR updates the parser to remove building the `CommentRanges` and
instead it'll be built by the linter and the formatter when it's
required.

For the linter, it'll be built and owned by the `Indexer` while for the
formatter it'll be built from the `Tokens` struct and passed as an
argument.

## Test Plan

`cargo insta test`
2024-06-09 09:55:17 +00:00
..
binary_like.rs Ruff 2024.2 style (#9639) 2024-02-29 09:30:54 +01:00
expr_attribute.rs Upgrade to Rust 1.78 (#11260) 2024-05-03 12:46:21 +00:00
expr_await.rs Fix instability with await fluent style (#8676) 2023-11-17 12:24:19 -05:00
expr_bin_op.rs Upgrade to Rust 1.78 (#11260) 2024-05-03 12:46:21 +00:00
expr_bool_op.rs Move {AnyNodeRef, AstNode} to ruff_python_ast crate root (#8030) 2023-10-18 00:01:18 +00:00
expr_boolean_literal.rs Split Constant to individual literal nodes (#8064) 2023-10-30 12:13:23 +05:30
expr_bytes_literal.rs Upgrade to Rust 1.78 (#11260) 2024-05-03 12:46:21 +00:00
expr_call.rs Upgrade to Rust 1.78 (#11260) 2024-05-03 12:46:21 +00:00
expr_compare.rs Upgrade to Rust 1.78 (#11260) 2024-05-03 12:46:21 +00:00
expr_dict.rs Refactor the ExprDict node (#11267) 2024-05-07 11:46:10 +00:00
expr_dict_comp.rs Upgrade to Rust 1.78 (#11260) 2024-05-03 12:46:21 +00:00
expr_ellipsis_literal.rs Split Constant to individual literal nodes (#8064) 2023-10-30 12:13:23 +05:30
expr_f_string.rs Upgrade to Rust 1.78 (#11260) 2024-05-03 12:46:21 +00:00
expr_generator.rs Upgrade to Rust 1.78 (#11260) 2024-05-03 12:46:21 +00:00
expr_if.rs Remove Expr postfix from ExprNamed, ExprIf, and ExprGenerator (#10229) 2024-03-04 12:55:01 +01:00
expr_ipy_escape_command.rs Formatter parentheses support for IpyEscapeCommand (#8207) 2023-10-25 14:01:50 +00:00
expr_lambda.rs Upgrade to Rust 1.78 (#11260) 2024-05-03 12:46:21 +00:00
expr_list.rs Upgrade to Rust 1.78 (#11260) 2024-05-03 12:46:21 +00:00
expr_list_comp.rs Upgrade to Rust 1.78 (#11260) 2024-05-03 12:46:21 +00:00
expr_name.rs Maintain synchronicity between the lexer and the parser (#11457) 2024-06-03 18:23:50 +05:30
expr_named.rs Upgrade to Rust 1.78 (#11260) 2024-05-03 12:46:21 +00:00
expr_none_literal.rs Split Constant to individual literal nodes (#8064) 2023-10-30 12:13:23 +05:30
expr_number_literal.rs Range formatting: Fix invalid syntax after parenthesizing expression (#9751) 2024-02-02 17:56:25 +01:00
expr_set.rs Upgrade to Rust 1.78 (#11260) 2024-05-03 12:46:21 +00:00
expr_set_comp.rs Upgrade to Rust 1.78 (#11260) 2024-05-03 12:46:21 +00:00
expr_slice.rs Upgrade to Rust 1.78 (#11260) 2024-05-03 12:46:21 +00:00
expr_starred.rs Upgrade to Rust 1.78 (#11260) 2024-05-03 12:46:21 +00:00
expr_string_literal.rs Upgrade to Rust 1.78 (#11260) 2024-05-03 12:46:21 +00:00
expr_subscript.rs Upgrade to Rust 1.78 (#11260) 2024-05-03 12:46:21 +00:00
expr_tuple.rs Upgrade to Rust 1.78 (#11260) 2024-05-03 12:46:21 +00:00
expr_unary_op.rs Upgrade to Rust 1.78 (#11260) 2024-05-03 12:46:21 +00:00
expr_yield.rs Avoid parenthesizing unsplittable because of comments (#8431) 2023-11-03 05:12:59 +00:00
expr_yield_from.rs Move {AnyNodeRef, AstNode} to ruff_python_ast crate root (#8030) 2023-10-18 00:01:18 +00:00
mod.rs Rename PreorderVisitor to SourceOrderVisitor (#11798) 2024-06-07 17:01:58 +00:00
operator.rs Split implicit concatenated strings before binary expressions (#7145) 2023-09-08 06:51:26 +00:00
parentheses.rs Build CommentRanges outside the parser (#11792) 2024-06-09 09:55:17 +00:00