Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
allow escaped hyphens too
  • Loading branch information
diakopter committed Nov 20, 2011
1 parent 93744c1 commit af28c73
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/QRegex/P6Regex/Actions.nqp
Expand Up @@ -306,7 +306,7 @@ class QRegex::P6Regex::Actions is HLL::Actions {
}

method backlit($/) {
my $qast := QAST::Regex.new( '\\', :rxtype('enumcharlist'),
my $qast := QAST::Regex.new( ~$/, :rxtype('enumcharlist'),
:node($/) );
make $qast;
}
Expand Down
2 changes: 1 addition & 1 deletion src/QRegex/P6Regex/Grammar.nqp
Expand Up @@ -195,7 +195,7 @@ grammar QRegex::P6Regex::Grammar is HLL::Grammar {

token assertion:sym<[> { <?before '['|'+'|'-'> <cclass_elem>+ }

token backlit { '\\' }
token backlit { '\\' | '-' }

token cclass_elem {
$<sign>=['+'|'-'|<?>]
Expand Down

0 comments on commit af28c73

Please sign in to comment.