Skip to content

Commit

Permalink
nom variable interpolation in regexes working again.
Browse files Browse the repository at this point in the history
  • Loading branch information
supernovus committed Sep 28, 2011
1 parent 06da21b commit 67d3b83
Showing 1 changed file with 9 additions and 7 deletions.
16 changes: 9 additions & 7 deletions lib/Exemel.pm
Expand Up @@ -252,14 +252,16 @@ class Exemel::Element does Exemel {
else {
## Temporary hack until Rakudo's variable interpolation is
## working again in RegExes.
if $node.name ~~ / ^ (\w+) ':' / {
if $0.Str ne $prefix { $matched = False; }
}
else {
$matched = False;
}
#if $node.name ~~ / ^ (\w+) ':' / {
# if $0.Str ne $prefix { $matched = False; }
# }
#else {
# $matched = False;
#}
## Re-enable this code once variable interpolation is fixed.
#if $node.name !~~ / ^ $prefix ':' / { $matched = False; }
## It seems to be working again, so I've re-enabled this.
## TODO: remove the above hackage in next release.
if $node.name !~~ / ^ $prefix ':' / { $matched = False; }
}
}

Expand Down

0 comments on commit 67d3b83

Please sign in to comment.