Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

forgot to add quoted chars to char classes

  • Loading branch information...
commit 8246478e0c3cd5d5aa26ce12d3d190675e122c3a 1 parent 2b1d764
@TimToady TimToady authored
Showing with 7 additions and 5 deletions.
  1. +7 −5 STD.pm6
View
12 STD.pm6
@@ -5022,12 +5022,11 @@ grammar Regex is STD {
token cclass_add {
<.normspace>?
- <cclass_elem> ** [$<op>=[ '+' | '-' ]]
+ <cclass_elem> ** [$<op>=[ '+' | '-' ]<.normspace>?]
}
token cclass_elem:name {
:dba('character class element')
- <.normspace>?
<name>
<.normspace>?
}
@@ -5035,7 +5034,6 @@ grammar Regex is STD {
token cclass_elem:sym<[ ]> {
:my $*CCSTATE = '';
:dba('character class element')
- <.normspace>?
<before '['> <quibble($¢.cursor_fresh( %*LANG<Q> ).tweak(:cc))>
<.normspace>?
}
@@ -5043,18 +5041,22 @@ grammar Regex is STD {
token cclass_elem:sym<( )> {
:my $*CCSTATE = '';
:dba('character class element')
- <.normspace>?
'(' ~ ')' <cclass_expr>
<.normspace>?
}
token cclass_elem:property {
:dba('character class element')
- <.normspace>?
[:lang(%*LANG<MAIN>) <colonpair> ]
<.normspace>?
}
+ token cclass_elem:quote {
+ <?before '"' | "'">
+ [:lang(%*LANG<MAIN>) <quote> ]
+ <.normspace>?
+ }
+
token mod_arg { :dba('modifier argument') '(' ~ ')' [:lang(%*LANG<MAIN>) <semilist> ] }
token mod_internal:sym<:my> { ':' <?before ['my'|'state'|'our'|'anon'|'constant'|'temp'|'let'] \s > [:lang(%*LANG<MAIN>) <statement> <eat_terminator> ] }
Please sign in to comment.
Something went wrong with that request. Please try again.