mirror of
https://github.com/astral-sh/ruff
synced 2026-01-22 05:51:03 -05:00
Add a dedicated token indexer for continuations and comments (#1886)
The primary motivation is that we can now robustly detect `\` continuations due to the addition of `Tok::NonLogicalNewline`. This PR generalizes the approach we took to comments (track all lines that contain any comments), and applies it to continuations too.
This commit is contained in:
@@ -1,8 +1,10 @@
|
||||
mod generator;
|
||||
mod indexer;
|
||||
mod locator;
|
||||
mod stylist;
|
||||
|
||||
pub(crate) use generator::Generator;
|
||||
pub(crate) use indexer::Indexer;
|
||||
pub(crate) use locator::Locator;
|
||||
use rustpython_parser::error::ParseError;
|
||||
use rustpython_parser::parser;
|
||||
|
||||
Reference in New Issue
Block a user