[Templates-cvs] cvs commit: Template2/parser Parser.yp

cvs@template-toolkit.org cvs@template-toolkit.org


cvs         07/02/09 16:43:42

  Modified:    parser   Parser.yp
  Log:
  changed parser grammar to accept expression in arguments
  
  Revision  Changes    Path
  2.21      +2 -2      Template2/parser/Parser.yp
  
  Index: Parser.yp
  ===================================================================
  RCS file: /template-toolkit/Template2/parser/Parser.yp,v
  retrieving revision 2.20
  retrieving revision 2.21
  diff -u -r2.20 -r2.21
  --- Parser.yp	2004/01/13 15:32:22	2.20
  +++ Parser.yp	2007/02/09 16:43:41	2.21
  @@ -37,7 +37,7 @@
   #
   #------------------------------------------------------------------------
   #
  -# $Id: Parser.yp,v 2.20 2004/01/13 15:32:22 abw Exp $
  +# $Id: Parser.yp,v 2.21 2007/02/09 16:43:41 abw Exp $
   #
   #========================================================================
   
  @@ -387,7 +387,7 @@
   # parameters.  Named parameters are stored in a list in element 0 
   # of the args list.  Remaining elements contain positional parameters
   
  -args:	    args term		    { push(@{$_[1]}, $_[2]); $_[1]        }
  +args:	    args expr		    { push(@{$_[1]}, $_[2]); $_[1]        }
   	|   args param              { push(@{$_[1]->[0]}, $_[2]); $_[1]   }
   	|   args ident ASSIGN expr  { push(@{$_[1]->[0]}, "'', " . 
   				      $factory->assign(@_[2,4])); $_[1]  }