Shlomi Fish avatar Shlomi Fish committed 415d447

More progress.

Comments (0)

Files changed (2)

Text-Qantor/lib/Text/Qantor/Parser.pm

 {
     my $self = shift;
 
-    # TODO : Remove this exception later.
-    $self->_parse_MACRO_START();
+    my $start = $self->_parse_MACRO_START();
+
+    if (! $start) {
+        $self->fail();
+    }
+
     my $name = $self->_parse_MACRO_NAME();
 
     my $inner = $self->scope_of(
         sub { my ($self, $text) = @_; return {Plain_Para_Text => $text}; },
     );
 
+    if (not length($token)) {
+        $self->fail();
+    }
+
     return $token;
 }
 
     around $meth => sub {
         my ($orig, $self, @params) = @_;
 
-        print "In [$meth] Now is: <<" . substr($self->{str}, $self->pos()) . ">>\n";
+        # print "In [$meth] Now is: <<" . substr($self->{str}, $self->pos()) . ">>\n";
 
         my $ret = $self->$orig(@params);
 
         use Data::Dumper;
-        print "In [$meth] consumed <<" . Dumper($ret) . ">>\n";
+        # print "In [$meth] consumed <<" . Dumper($ret) . ">>\n";
 
         return $ret;
     };

Text-Qantor/t/lib/Test/XML/Ordered.pm

     elsif ($status_struct->{param} eq "text")
     {
         return 
-            "Texts differ: Got at " . $self->_got->lineNumber(). " ; Expected at ". $self->_expected->lineNumber();
+            "Texts differ: Got at " . $self->_got->lineNumber(). " with value <<@{[$self->_got->value()]}>> ; Expected at ". $self->_expected->lineNumber() . " with value <<@{[$self->_expected->value()]}>>.";
     }
     elsif ($status_struct->{param} eq "element_name")
     {
Tip: Filter by directory path e.g. /media app.js to search for public/media/app.js.
Tip: Use camelCasing e.g. ProjME to search for ProjectModifiedEvent.java.
Tip: Filter by extension type e.g. /repo .js to search for all .js files in the /repo directory.
Tip: Separate your search with spaces e.g. /ssh pom.xml to search for src/ssh/pom.xml.
Tip: Use ↑ and ↓ arrow keys to navigate and return to view the file.
Tip: You can also navigate files with Ctrl+j (next) and Ctrl+k (previous) and view the file with Ctrl+o.
Tip: You can also navigate files with Alt+j (next) and Alt+k (previous) and view the file with Alt+o.