diff options
| author | Donato Sciarra <sciarp@gmail.com> | 2018-08-18 12:13:52 +0200 |
|---|---|---|
| committer | Donato Sciarra <sciarp@gmail.com> | 2018-08-19 23:00:59 +0200 |
| commit | d6dcbcd4e11a1b787a9db1fa43a49907e8bccecf (patch) | |
| tree | 37af96f2adba41bfc3ff98e45006918de702d44c /src/libsyntax/parse/lexer | |
| parent | c65547337831babea8d9052b960649309263df36 (diff) | |
| download | rust-d6dcbcd4e11a1b787a9db1fa43a49907e8bccecf.tar.gz rust-d6dcbcd4e11a1b787a9db1fa43a49907e8bccecf.zip | |
mv FileMap SourceFile
Diffstat (limited to 'src/libsyntax/parse/lexer')
| -rw-r--r-- | src/libsyntax/parse/lexer/mod.rs | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/src/libsyntax/parse/lexer/mod.rs b/src/libsyntax/parse/lexer/mod.rs index c1919434e37..654ac692338 100644 --- a/src/libsyntax/parse/lexer/mod.rs +++ b/src/libsyntax/parse/lexer/mod.rs @@ -49,7 +49,7 @@ pub struct StringReader<'a> { pub pos: BytePos, /// The current character (which has been read from self.pos) pub ch: Option<char>, - pub filemap: Lrc<syntax_pos::FileMap>, + pub filemap: Lrc<syntax_pos::SourceFile>, /// Stop reading src at this index. pub end_src_index: usize, // cached: @@ -180,7 +180,7 @@ impl<'a> StringReader<'a> { } /// For comments.rs, which hackily pokes into next_pos and ch - fn new_raw(sess: &'a ParseSess, filemap: Lrc<syntax_pos::FileMap>, override_span: Option<Span>) + fn new_raw(sess: &'a ParseSess, filemap: Lrc<syntax_pos::SourceFile>, override_span: Option<Span>) -> Self { let mut sr = StringReader::new_raw_internal(sess, filemap, override_span); @@ -189,7 +189,7 @@ impl<'a> StringReader<'a> { sr } - fn new_raw_internal(sess: &'a ParseSess, filemap: Lrc<syntax_pos::FileMap>, + fn new_raw_internal(sess: &'a ParseSess, filemap: Lrc<syntax_pos::SourceFile>, override_span: Option<Span>) -> Self { if filemap.src.is_none() { @@ -221,7 +221,7 @@ impl<'a> StringReader<'a> { } } - pub fn new(sess: &'a ParseSess, filemap: Lrc<syntax_pos::FileMap>, override_span: Option<Span>) + pub fn new(sess: &'a ParseSess, filemap: Lrc<syntax_pos::SourceFile>, override_span: Option<Span>) -> Self { let mut sr = StringReader::new_raw(sess, filemap, override_span); @@ -468,7 +468,7 @@ impl<'a> StringReader<'a> { } /// Advance the StringReader by one character. If a newline is - /// discovered, add it to the FileMap's list of line start offsets. + /// discovered, add it to the SourceFile's list of line start offsets. crate fn bump(&mut self) { let next_src_index = self.src_index(self.next_pos); if next_src_index < self.end_src_index { |
