Add new literal type Err

This commit is contained in:
Yuki Okushi 2019-01-16 09:27:43 +09:00
parent e2f221c759
commit d19294feee
5 changed files with 6 additions and 0 deletions

View file

@ -466,6 +466,7 @@ crate fn lit_token(lit: token::Lit, suf: Option<Symbol>, diag: Option<(Span, &Ha
match lit {
token::Byte(i) => (true, Some(LitKind::Byte(byte_lit(&i.as_str()).0))),
token::Char(i) => (true, Some(LitKind::Char(char_lit(&i.as_str(), diag).0))),
token::Err(i) => (true, Some(LitKind::Char(char_lit(&i.as_str(), diag).0))),
// There are some valid suffixes for integer and float literals,
// so all the handling is done internally.