Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse code

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

  • Loading branch information...
commit eab43ab08b6e6c586d257a126004ba0ed900760c 1 parent 5e824f4
Timothy Totten authored

Showing 2 changed files with 12 additions and 1 deletion. Show diff stats Hide diff stats

  1. +1 0  .gitignore
  2. +11 1 lib/Exemel.pm
1  .gitignore
... ... @@ -1,3 +1,4 @@
1 1 *.pir
  2 +*.swp
2 3 Makefile
3 4 blib/
12 lib/Exemel.pm
@@ -240,7 +240,16 @@ class Exemel::Element does Exemel {
240 240 if $node.name ~~ / ':' / { $matched = False; }
241 241 }
242 242 else {
243   - if $node.name !~~ / ^ $prefix ':' / { $matched = False; }
  243 + ## Temporary hack until Rakudo's variable interpolation is
  244 + ## working again in RegExes.
  245 + if $node.name ~~ / ^ (\w+) ':' / {
  246 + if $0.Str ne $prefix { $matched = False; }
  247 + }
  248 + else {
  249 + $matched = False;
  250 + }
  251 + ## Re-enable this code once variable interpolation is fixed.
  252 + #if $node.name !~~ / ^ $prefix ':' / { $matched = False; }
244 253 }
245 254 }
246 255
@@ -413,6 +422,7 @@ class Exemel::Document does Exemel {
413 422 my $root;
414 423 my $doc = Exemel::Grammar.parse($xml);
415 424 if ($doc) {
  425 + $*ERR.say: "We parsed the doc";
416 426 if ($doc<xmldecl>) {
417 427 $version = ~$doc<xmldecl>[0]<version><value>;
418 428 if ($doc<xmldecl>[0]<encoding>) {

0 comments on commit eab43ab

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