diff --git a/src/NQP/Actions.pm b/src/NQP/Actions.pm index 22ce197..279030e 100644 --- a/src/NQP/Actions.pm +++ b/src/NQP/Actions.pm @@ -829,6 +829,12 @@ class NQP::RegexActions is Regex::P6Regex::Actions { :pasttype, :node($/) ); } + method assertion:sym($/) { + make PAST::Regex.new( $.ast, + :subtype, :negate( $ eq '!' ), + :pasttype, :node($/) ); + } + method assertion:sym($/) { make PAST::Regex.new( '!INTERPOLATE_REGEX', $.ast, :pasttype, :subtype, :node($/)); diff --git a/src/NQP/Grammar.pm b/src/NQP/Grammar.pm index 3f439b7..e632f18 100644 --- a/src/NQP/Grammar.pm +++ b/src/NQP/Grammar.pm @@ -558,8 +558,12 @@ grammar NQP::Regex is Regex::P6Regex::Grammar { } - token assertion:sym<{ }> { - + # token assertion:sym<{ }> { + # + # } + + token assertion:sym { + $=[ <[?!]> ] } token assertion:sym {