mirror of https://github.com/astral-sh/ruff
Update crates/ruff_linter/src/checkers/ast/mod.rs
Co-authored-by: Micha Reiser <micha@reiser.io>
This commit is contained in:
parent
ef3c373f85
commit
703a1e3375
|
|
@ -437,7 +437,11 @@ impl<'a> Checker<'a> {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/// Returns the [`Tokens`] for the parsed source file
|
/// Returns the [`Tokens`] for the parsed source file.
|
||||||
|
///
|
||||||
|
///
|
||||||
|
/// Unlike [`Self::tokens`], this method always returns
|
||||||
|
/// the tokens for the current file, even when within a parsed type annotation.
|
||||||
pub(crate) fn source_tokens(&self) -> &'a Tokens {
|
pub(crate) fn source_tokens(&self) -> &'a Tokens {
|
||||||
self.parsed.tokens()
|
self.parsed.tokens()
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue