Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
<?{}> parse depended on non-lltm ordering
  • Loading branch information
TimToady committed Nov 16, 2014
1 parent 4da5e49 commit 5f5ddb4
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 2 deletions.
8 changes: 7 additions & 1 deletion src/Perl6/Actions.nqp
Expand Up @@ -7456,7 +7456,13 @@ class Perl6::RegexActions is QRegex::P6Regex::Actions does STDActions {

method assertion:sym<?{ }>($/) {
make QAST::Regex.new( $<codeblock>.ast,
:subtype<zerowidth>, :negate( $<zw> eq '!' ),
:subtype<zerowidth>, :negate( False ),
:rxtype<qastnode>, :node($/) );
}

method assertion:sym<!{ }>($/) {
make QAST::Regex.new( $<codeblock>.ast,
:subtype<zerowidth>, :negate( True ),
:rxtype<qastnode>, :node($/) );
}

Expand Down
6 changes: 5 additions & 1 deletion src/Perl6/Grammar.nqp
Expand Up @@ -4739,7 +4739,11 @@ grammar Perl6::RegexGrammar is QRegex::P6Regex::Grammar does STD {
}

token assertion:sym<?{ }> {
$<zw>=[ <[?!]> <?[{]> ] <codeblock>
'?' <?before '{'> <codeblock>
}

token assertion:sym<!{ }> {
'!' <?before '{'> <codeblock>
}

token assertion:sym<var> {
Expand Down

0 comments on commit 5f5ddb4

Please sign in to comment.