about summary refs log tree commit diff
path: root/src/libsyntax/parse
diff options
context:
space:
mode:
Diffstat (limited to 'src/libsyntax/parse')
-rw-r--r--src/libsyntax/parse/lexer/mod.rs4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/libsyntax/parse/lexer/mod.rs b/src/libsyntax/parse/lexer/mod.rs
index 7132dc342d2..a814c88ee78 100644
--- a/src/libsyntax/parse/lexer/mod.rs
+++ b/src/libsyntax/parse/lexer/mod.rs
@@ -240,9 +240,11 @@ impl<'a> StringReader<'a> {
 
     pub fn new_without_err(sess: &'a ParseSess,
                            source_file: Lrc<syntax_pos::SourceFile>,
-                           override_span: Option<Span>) -> Result<Self, ()> {
+                           override_span: Option<Span>,
+                           prepend_error_text: &str) -> Result<Self, ()> {
         let mut sr = StringReader::new_raw(sess, source_file, override_span);
         if sr.advance_token().is_err() {
+            eprintln!("{}", prepend_error_text);
             sr.emit_fatal_errors();
             return Err(());
         }