Simplify use of keyword symbols

This commit is contained in:
Vadim Petrochenkov
2019-05-11 17:41:37 +03:00
parent 37ff5d388f
commit 59a382122f
58 changed files with 502 additions and 534 deletions

View File

@@ -1,5 +1,5 @@
use crate::parse::token::{Token, BinOpToken};
use crate::symbol::keywords;
use crate::symbol::kw;
use crate::ast::{self, BinOpKind};
/// Associative operator with precedence.
@@ -100,7 +100,7 @@ impl AssocOp {
// DotDotDot is no longer supported, but we need some way to display the error
Token::DotDotDot => Some(DotDotEq),
Token::Colon => Some(Colon),
_ if t.is_keyword(keywords::As) => Some(As),
_ if t.is_keyword(kw::As) => Some(As),
_ => None
}
}