Skip to content

Commit

Permalink
Remove old workaround for partial-token-parsing
Browse files Browse the repository at this point in the history
  • Loading branch information
jaybosamiya committed Nov 10, 2023
1 parent e3859b1 commit 0429c12
Showing 1 changed file with 8 additions and 11 deletions.
19 changes: 8 additions & 11 deletions src/verus.pest
Original file line number Diff line number Diff line change
Expand Up @@ -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 = _{
Expand Down Expand Up @@ -1153,8 +1150,8 @@ underscore_expr = {
attr* ~ "_"
}

box_expr = ${
attr* ~ box_str ~ WHITESPACE+ ~ expr
box_expr = {
attr* ~ box_str ~ expr
}

//*************************//
Expand Down

0 comments on commit 0429c12

Please sign in to comment.