Skip to content

Commit b82e517

Browse files
committed
Remove unnecessary parens in the "Reserved prefix or unterminated literal" rule
1 parent e25cb56 commit b82e517

File tree

2 files changed

+6
-10
lines changed

2 files changed

+6
-10
lines changed

src/lexlucid/pretokenisation/pretokenisation_rules.rs

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -586,11 +586,9 @@ fn make_named_rules() -> BTreeMap<RuleName, Rule> {
586586
(RuleName::ReservedPrefixOrUnterminatedLiteral2021,
587587
Rule::new_regex(
588588
|_| PretokenData::Reserved, r##"\A
589-
(
590-
[ \p{XID_Start} _ ]
591-
\p{XID_Continue} *
592-
)
593-
( \# | " | ')
589+
[ \p{XID_Start} _ ]
590+
\p{XID_Continue} *
591+
( \# | " | ' )
594592
"##)),
595593

596594
// Non-raw identifier

writeup/rules.md

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -712,11 +712,9 @@ r \#
712712

713713
##### Pattern
714714
```
715-
(
716-
[ \p{XID_Start} _ ]
717-
\p{XID_Continue} *
718-
)
719-
( \# | " | ')
715+
[ \p{XID_Start} _ ]
716+
\p{XID_Continue} *
717+
( \# | " | ' )
720718
```
721719

722720
##### Pretoken kind

0 commit comments

Comments
 (0)