Mention that Cursor is based on rustc's implementation. (#12109)

This commit is contained in:
Micha Reiser 2024-06-30 17:53:25 +02:00 committed by GitHub
parent d1079680bb
commit f765d19402
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 4 additions and 0 deletions

View file

@ -5,6 +5,8 @@ use ruff_text_size::{TextLen, TextSize};
pub(crate) const EOF_CHAR: char = '\0';
/// A cursor represents a pointer in the source code.
///
/// Based on [`rustc`'s `Cursor`](https://github.com/rust-lang/rust/blob/d1b7355d3d7b4ead564dbecb1d240fcc74fff21b/compiler/rustc_lexer/src/cursor.rs)
#[derive(Clone, Debug)]
pub(super) struct Cursor<'src> {
/// An iterator over the [`char`]'s of the source code.