1
Fork 0

syntax: Make _ an identifier

This commit is contained in:
Vadim Petrochenkov 2018-03-08 14:27:23 +03:00
parent 61b6bf54fd
commit 5d06c890fe
20 changed files with 109 additions and 119 deletions

View file

@ -765,8 +765,7 @@ fn may_begin_with(name: &str, token: &Token) -> bool {
Token::DotDotDot | // range pattern (future compat)
Token::ModSep | // path
Token::Lt | // path (UFCS constant)
Token::BinOp(token::Shl) | // path (double UFCS)
Token::Underscore => true, // placeholder
Token::BinOp(token::Shl) => true, // path (double UFCS)
Token::Interpolated(ref nt) => may_be_ident(&nt.0),
_ => false,
},