Rollup merge of #56255 - jasonl:update-old-documents, r=michaelwoerister
Update outdated code comments in StringReader For the detection of newlines in the lexer, this is now done in `analyze_source_file.rs`.
This commit is contained in:
commit
d1b0681bd7
1 changed files with 2 additions and 3 deletions
|
@ -60,11 +60,11 @@ pub struct StringReader<'a> {
|
||||||
// cache a direct reference to the source text, so that we don't have to
|
// cache a direct reference to the source text, so that we don't have to
|
||||||
// retrieve it via `self.source_file.src.as_ref().unwrap()` all the time.
|
// retrieve it via `self.source_file.src.as_ref().unwrap()` all the time.
|
||||||
src: Lrc<String>,
|
src: Lrc<String>,
|
||||||
/// Stack of open delimiters and their spans. Used for error message.
|
|
||||||
token: token::Token,
|
token: token::Token,
|
||||||
span: Span,
|
span: Span,
|
||||||
/// The raw source span which *does not* take `override_span` into account
|
/// The raw source span which *does not* take `override_span` into account
|
||||||
span_src_raw: Span,
|
span_src_raw: Span,
|
||||||
|
/// Stack of open delimiters and their spans. Used for error message.
|
||||||
open_braces: Vec<(token::DelimToken, Span)>,
|
open_braces: Vec<(token::DelimToken, Span)>,
|
||||||
/// The type and spans for all braces
|
/// The type and spans for all braces
|
||||||
///
|
///
|
||||||
|
@ -506,8 +506,7 @@ impl<'a> StringReader<'a> {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/// Advance the StringReader by one character. If a newline is
|
/// Advance the StringReader by one character.
|
||||||
/// discovered, add it to the SourceFile's list of line start offsets.
|
|
||||||
crate fn bump(&mut self) {
|
crate fn bump(&mut self) {
|
||||||
let next_src_index = self.src_index(self.next_pos);
|
let next_src_index = self.src_index(self.next_pos);
|
||||||
if next_src_index < self.end_src_index {
|
if next_src_index < self.end_src_index {
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue