Skip to content
Browse files

Worked around a nom issue. Still need to fix grammar to work in nom.

  • Loading branch information...
1 parent 5e824f4 commit eab43ab08b6e6c586d257a126004ba0ed900760c @supernovus committed Sep 26, 2011
Showing with 12 additions and 1 deletion.
  1. +1 −0 .gitignore
  2. +11 −1 lib/Exemel.pm
View
1 .gitignore
@@ -1,3 +1,4 @@
*.pir
+*.swp
Makefile
blib/
View
12 lib/Exemel.pm
@@ -240,7 +240,16 @@ class Exemel::Element does Exemel {
if $node.name ~~ / ':' / { $matched = False; }
}
else {
- if $node.name !~~ / ^ $prefix ':' / { $matched = False; }
+ ## 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;
+ }
+ ## Re-enable this code once variable interpolation is fixed.
+ #if $node.name !~~ / ^ $prefix ':' / { $matched = False; }
}
}
@@ -413,6 +422,7 @@ class Exemel::Document does Exemel {
my $root;
my $doc = Exemel::Grammar.parse($xml);
if ($doc) {
+ $*ERR.say: "We parsed the doc";
if ($doc<xmldecl>) {
$version = ~$doc<xmldecl>[0]<version><value>;
if ($doc<xmldecl>[0]<encoding>) {

0 comments on commit eab43ab

Please sign in to comment.
Something went wrong with that request. Please try again.