Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Get ~ goal matching syntax working again; Cursor.FAILGOAL is missing …
…yet, so the error sucks, but otherwise it seems to do the right thing.
  • Loading branch information
jnthn committed Nov 18, 2011
1 parent 5523be6 commit 5a3575c
Showing 1 changed file with 13 additions and 0 deletions.
13 changes: 13 additions & 0 deletions src/QRegex/P6Regex/Actions.nqp
Expand Up @@ -201,6 +201,19 @@ class QRegex::P6Regex::Actions is HLL::Actions {
make $qast;
}

method metachar:sym<~>($/) {
make QAST::Regex.new(
$<EXPR>.ast,
QAST::Regex.new(
$<GOAL>.ast,
QAST::Regex.new( PAST::Node.new('FAILGOAL', ~$<GOAL>),
:rxtype<subrule>, :subtype<method> ),
:rxtype<altseq>
),
:rxtype<concat>
);
}

method backslash:sym<s>($/) {
make QAST::Regex.new(:rxtype<cclass>, '.CCLASS_WHITESPACE',
:subtype($<sym> eq 'n' ?? 'nl' !! ~$<sym>),
Expand Down

0 comments on commit 5a3575c

Please sign in to comment.