diff --git a/src/verus.pest b/src/verus.pest index 6910b4d..28b8f89 100644 --- a/src/verus.pest +++ b/src/verus.pest @@ -841,19 +841,16 @@ expr_inner_no_struct = _{ | path_expr // Needs to be last, or it matches against keywords like "while" } -// The next three rules are defined to be atomic, since they -// all require one or more explicit whitespace tokens. -// This avoids, e.g., parsing "assert" has "as sert". -expr_as = ${ - as_str ~ WHITESPACE+ ~ type +expr_as = { + as_str ~ type } -expr_has = ${ - has_str ~ WHITESPACE+ ~ expr +expr_has = { + has_str ~ expr } -expr_is = ${ - is_str ~ WHITESPACE+ ~ type +expr_is = { + is_str ~ type } expr_outer = _{ @@ -1153,8 +1150,8 @@ underscore_expr = { attr* ~ "_" } -box_expr = ${ - attr* ~ box_str ~ WHITESPACE+ ~ expr +box_expr = { + attr* ~ box_str ~ expr } //*************************//