syntax: Return named errors from literal parsing functions

This commit is contained in:
Vadim Petrochenkov
2019-05-18 17:36:30 +03:00
parent 85334c5092
commit fcc2f92f45
6 changed files with 169 additions and 131 deletions

View File

@@ -1054,7 +1054,7 @@ impl<'a> Parser<'a> {
}
fn expect_no_suffix(&self, sp: Span, kind: &str, suffix: Option<ast::Name>) {
literal::expect_no_suffix(sp, &self.sess.span_diagnostic, kind, suffix)
literal::expect_no_suffix(&self.sess.span_diagnostic, sp, kind, suffix)
}
/// Attempts to consume a `<`. If `<<` is seen, replaces it with a single