Commits

Shlomi Fish  committed 415d447

More progress.

  • Participants
  • Parent commits 5559302

Comments (0)

Files changed (2)

File 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;
     };

File 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")
     {