make token set a const-fn

This commit is contained in:
Aleksey Kladov 2019-01-18 11:02:30 +03:00
parent b028472481
commit b82fe73d1a
8 changed files with 52 additions and 57 deletions

View file

@ -211,10 +211,8 @@ fn expr_bp(p: &mut Parser, r: Restrictions, bp: u8) -> BlockLike {
BlockLike::NotBlock
}
const LHS_FIRST: TokenSet = token_set_union![
token_set![AMP, STAR, EXCL, DOTDOT, DOTDOTEQ, MINUS],
atom::ATOM_EXPR_FIRST,
];
const LHS_FIRST: TokenSet =
atom::ATOM_EXPR_FIRST.union(token_set![AMP, STAR, EXCL, DOTDOT, DOTDOTEQ, MINUS]);
fn lhs(p: &mut Parser, r: Restrictions) -> Option<(CompletedMarker, BlockLike)> {
let m;