ruff/crates/ruff_python_formatter/src
Dhruv Manilawala 47f0b45be3
Implement AstNode for Identifier (#13207)
## Summary

Follow-up to #13147, this PR implements the `AstNode` for `Identifier`.
This makes it easier to create the `NodeKey` in red knot because it uses
a generic method to construct the key from `AnyNodeRef` and is important
for definitions that are created only on identifiers instead of
`ExprName`.

## Test Plan

`cargo test` and `cargo clippy`
2024-09-02 16:27:12 +05:30
..
comments Fix incorrect placement of leading function comment with type params (#12447) 2024-07-22 14:17:00 +02:00
expression Implement iter(), len() and is_empty() for all display-literal AST nodes (#12807) 2024-08-12 10:39:28 +00:00
module Upgrade to Rust 1.78 (#11260) 2024-05-03 12:46:21 +00:00
other Insert empty line between suite and alternative branch after def/class (#12294) 2024-07-15 12:59:33 +02:00
pattern Upgrade to Rust 1.78 (#11260) 2024-05-03 12:46:21 +00:00
snapshots Remove exception-handler lexing from unused-bound-exception fix (#5851) 2023-07-18 18:27:46 +00:00
statement Upgrade to Rust 1.80 (#12586) 2024-07-30 19:18:08 +00:00
string Upgrade to Rust 1.80 (#12586) 2024-07-30 19:18:08 +00:00
type_param Upgrade to Rust 1.78 (#11260) 2024-05-03 12:46:21 +00:00
builders.rs Avoid multiline expression if format specifier is present (#11123) 2024-04-26 13:34:38 +00:00
cli.rs Build CommentRanges outside the parser (#11792) 2024-06-09 09:55:17 +00:00
context.rs Maintain synchronicity between the lexer and the parser (#11457) 2024-06-03 18:23:50 +05:30
generated.rs Remove Expr postfix from ExprNamed, ExprIf, and ExprGenerator (#10229) 2024-03-04 12:55:01 +01:00
lib.rs Build CommentRanges outside the parser (#11792) 2024-06-09 09:55:17 +00:00
main.rs Formatter and parser refactoring (#7569) 2023-09-26 15:29:43 +02:00
options.rs Add Python 3.13 to list of allowed Python versions (#11411) 2024-05-13 16:35:41 +00:00
prelude.rs
preview.rs Use space separator before parenthesiszed expressions in comprehensions with leading comments. (#12282) 2024-07-11 22:38:12 +02:00
range.rs Implement AstNode for Identifier (#13207) 2024-09-02 16:27:12 +05:30
shared_traits.rs ruff_python_formatter: copy and inline shared traits (#8656) 2023-11-13 12:16:04 -05:00
verbatim.rs Fix formatter instability for lines only consisting of zero-width characters (#11748) 2024-06-05 17:55:14 +02:00