Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
forgot to add quoted chars to char classes
  • Loading branch information
TimToady committed Feb 9, 2011
1 parent 2b1d764 commit 8246478
Showing 1 changed file with 7 additions and 5 deletions.
12 changes: 7 additions & 5 deletions STD.pm6
Expand Up @@ -5022,39 +5022,41 @@ 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>?
}

token cclass_elem:sym<[ ]> {
:my $*CCSTATE = '';
:dba('character class element')
<.normspace>?
<before '['> <quibble($¢.cursor_fresh( %*LANG<Q> ).tweak(:cc))>
<.normspace>?
}

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> ] }
Expand Down

0 comments on commit 8246478

Please sign in to comment.