Adding a MatchFragment rule
Also reducing the amount of object cloning that is being done
This commit is contained in:
@@ -2,8 +2,9 @@ grammar JavascriptRegexp
|
||||
root <- ( ( "/" regexp "/" _flags:[igm]* ) / regexp ""? ) <Root>
|
||||
regexp <- _match:match _alternates:( "|" match )* <Regexp>
|
||||
match <- _anchor_start:anchor_start?
|
||||
_parts:( ( subexp / charset / terminal ) repeat? )*
|
||||
_parts:match_fragment*
|
||||
_anchor_end:anchor_end? <Match>
|
||||
match_fragment <- ( subexp / charset / terminal ) repeat? <MatchFragment>
|
||||
anchor_start <- "^"
|
||||
anchor_end <- "$"
|
||||
repeat <- ( repeat_any / repeat_required / repeat_optional / repeat_spec ) repeat_greedy?
|
||||
|
||||
Reference in New Issue
Block a user