[Templates-cvs] cvs commit: TT3/lib/Template Parser.pm

cvs@template-toolkit.org cvs@template-toolkit.org
Wed, 01 Dec 2004 18:22:38 +0000


cvs         04/12/01 18:22:38

  Modified:    lib/Template Parser.pm
  Log:
  * fixed MACRO errors
  
  Revision  Changes    Path
  1.14      +9 -10     TT3/lib/Template/Parser.pm
  
  Index: Parser.pm
  ===================================================================
  RCS file: /template-toolkit/TT3/lib/Template/Parser.pm,v
  retrieving revision 1.13
  retrieving revision 1.14
  diff -u -r1.13 -r1.14
  --- Parser.pm	2004/12/01 17:59:36	1.13
  +++ Parser.pm	2004/12/01 18:22:38	1.14
  @@ -18,7 +18,7 @@
   #   modify it under the same terms as Perl itself.
   #
   # REVISION
  -#   $Id: Parser.pm,v 1.13 2004/12/01 17:59:36 abw Exp $
  +#   $Id: Parser.pm,v 1.14 2004/12/01 18:22:38 abw Exp $
   #
   #========================================================================
   
  @@ -29,7 +29,7 @@
   use Template::Base;
   use base qw( Template::Base );
   
  -our $VERSION = sprintf("%d.%02d", q$Revision: 1.13 $ =~ /(\d+)\.(\d+)/);
  +our $VERSION = sprintf("%d.%02d", q$Revision: 1.14 $ =~ /(\d+)\.(\d+)/);
   our $DEBUG   = 0 unless defined $DEBUG;
   our $ERROR   = '';
   our $THROW   = 'parser';
  @@ -526,7 +526,7 @@
               my $text = $2;
               $token = $self->parse_variable(\$text)
                   || return $self->missing( $textref,  
  -                                          "missing variable in '\${ }'" );
  +                                          "variable in '\${ }'" );
               push(@tokens, $token);
           }
           elsif (defined $3) {
  @@ -534,7 +534,7 @@
               my $text = $3;
               $token = $self->parse_variable(\$text) 
                   || return $self->missing( $textref,  
  -                                          'missing variable after \$' );
  +                                          'variable after \$' );
               push(@tokens, $token);
           }
           else {
  @@ -1113,16 +1113,15 @@
                   # then end of the tag, then report a missing ')', otherwise we
                   # report that a non-identifier was found in the args list
                   if ($$textref =~ / (?= \G \s* $ ) /cgsx) {
  -                    return $self->missing( $textref,  
  -                                           'unexpected end of text in argument list');
  +                    return $self->error('unexpected end of text in argument list');
                   }
                   elsif ($tag_end && ($$textref =~ /$tag_end/cg)) {
                       return $self->missing( $textref,  
  -                                           "missing ')' at end of argument list" );
  +                                           "')' at end of argument list" );
                   }
                   else {
  -                    return $self->missing( $textref, 
  -                                           'non-identifier found in argument list' );
  +                    return $self->unexpected( $textref, 
  +                                              'in argument list' );
                   }
               }
   
  @@ -1492,7 +1491,7 @@
   
   =head1 VERSION
   
  -$Revision: 1.13 $
  +$Revision: 1.14 $
   
   =head1 COPYRIGHT