diff options
Diffstat (limited to 'src/libsyntax/parse')
| -rw-r--r-- | src/libsyntax/parse/lexer/mod.rs | 4 | ||||
| -rw-r--r-- | src/libsyntax/parse/mod.rs | 4 | ||||
| -rw-r--r-- | src/libsyntax/parse/parser.rs | 6 |
3 files changed, 7 insertions, 7 deletions
diff --git a/src/libsyntax/parse/lexer/mod.rs b/src/libsyntax/parse/lexer/mod.rs index 6cfa2b4abe8..434548ffd9d 100644 --- a/src/libsyntax/parse/lexer/mod.rs +++ b/src/libsyntax/parse/lexer/mod.rs @@ -43,9 +43,9 @@ impl Default for TokenAndSpan { pub struct StringReader<'a> { pub sess: &'a ParseSess, - /// The absolute offset within the codemap of the next character to read + /// The absolute offset within the source_map of the next character to read pub next_pos: BytePos, - /// The absolute offset within the codemap of the current character + /// The absolute offset within the source_map of the current character pub pos: BytePos, /// The current character (which has been read from self.pos) pub ch: Option<char>, diff --git a/src/libsyntax/parse/mod.rs b/src/libsyntax/parse/mod.rs index 3f66dae4e1b..e3a2c83e4c2 100644 --- a/src/libsyntax/parse/mod.rs +++ b/src/libsyntax/parse/mod.rs @@ -189,7 +189,7 @@ pub fn new_parser_from_file<'a>(sess: &'a ParseSess, path: &Path) -> Parser<'a> } /// Given a session, a crate config, a path, and a span, add -/// the file at the given path to the codemap, and return a parser. +/// the file at the given path to the source_map, and return a parser. /// On an error, use the given span as the source of the problem. crate fn new_sub_parser_from_file<'a>(sess: &'a ParseSess, path: &Path, @@ -224,7 +224,7 @@ pub fn new_parser_from_tts(sess: &ParseSess, tts: Vec<TokenTree>) -> Parser { // base abstractions /// Given a session and a path and an optional span (for error reporting), -/// add the path to the session's codemap and return the new source_file. +/// add the path to the session's source_map and return the new source_file. fn file_to_source_file(sess: &ParseSess, path: &Path, spanopt: Option<Span>) -> Lrc<SourceFile> { match sess.source_map().load_file(path) { diff --git a/src/libsyntax/parse/parser.rs b/src/libsyntax/parse/parser.rs index c9053f0fec9..b1e2e69863d 100644 --- a/src/libsyntax/parse/parser.rs +++ b/src/libsyntax/parse/parser.rs @@ -6322,7 +6322,7 @@ impl<'a> Parser<'a> { id: ast::Ident, relative: Option<ast::Ident>, dir_path: &Path, - codemap: &SourceMap) -> ModulePath + source_map: &SourceMap) -> ModulePath { // If we're in a foo.rs file instead of a mod.rs file, // we need to look for submodules in @@ -6342,8 +6342,8 @@ impl<'a> Parser<'a> { relative_prefix, mod_name, path::MAIN_SEPARATOR); let default_path = dir_path.join(&default_path_str); let secondary_path = dir_path.join(&secondary_path_str); - let default_exists = codemap.file_exists(&default_path); - let secondary_exists = codemap.file_exists(&secondary_path); + let default_exists = source_map.file_exists(&default_path); + let secondary_exists = source_map.file_exists(&secondary_path); let result = match (default_exists, secondary_exists) { (true, false) => Ok(ModulePathSuccess { |
