Skip to content
This repository has been archived by the owner on Feb 3, 2021. It is now read-only.

Commit

Permalink
Zero-width anchors allow prefix tokens.
Browse files Browse the repository at this point in the history
  • Loading branch information
pmichaud committed Oct 23, 2009
1 parent 86ff73b commit d6f5066
Showing 1 changed file with 13 additions and 0 deletions.
13 changes: 13 additions & 0 deletions src/PAST/Regex.pir
Expand Up @@ -144,6 +144,19 @@ at this node.
.end
.sub 'prefix_anchor' :method
.param string prefix
.param pmc tail
unless tail goto anchor_done
.local pmc head
head = shift tail
.tailcall head.'prefix'(prefix, tail :flat)
anchor_done:
.return (prefix)
.end
.sub 'prefix_concat' :method
.param string prefix
.param pmc tail
Expand Down

0 comments on commit d6f5066

Please sign in to comment.