geirm       00/11/20 18:29:40

  Modified:    src/java/org/apache/velocity/runtime/parser Parser.jjt
  Log:
  Fix for jason's #if()$foo#end bug.
  
  Revision  Changes    Path
  1.32      +13 -1     
jakarta-velocity/src/java/org/apache/velocity/runtime/parser/Parser.jjt
  
  Index: Parser.jjt
  ===================================================================
  RCS file: 
/home/cvs/jakarta-velocity/src/java/org/apache/velocity/runtime/parser/Parser.jjt,v
  retrieving revision 1.31
  retrieving revision 1.32
  diff -u -r1.31 -r1.32
  --- Parser.jjt        2000/11/19 23:14:49     1.31
  +++ Parser.jjt        2000/11/21 02:29:38     1.32
  @@ -130,7 +130,7 @@
    *
    * @author <a href="mailto:[EMAIL PROTECTED]">Jason van Zyl</a>
    * @author <a href="mailto:[EMAIL PROTECTED]">Geir Magnusson Jr.</a>
  - * @version $Id: Parser.jjt,v 1.31 2000/11/19 23:14:49 geirm Exp $ 
  + * @version $Id: Parser.jjt,v 1.32 2000/11/21 02:29:38 geirm Exp $ 
   */
   public class Parser
   {
  @@ -655,6 +655,18 @@
       { 
           if (! inComment)
           {
  +            /*
  +             *  We can have the situation where #if($foo)$foo#end.  We need to 
transition out of 
  +             *  REFERENCE before going to DIRECTIVE.  I don't really like this, but 
I can't think of
  +             *  a legal way you are going into DIRECTIVE while in REFERENCE.  -gmj
  +             */
  +
  +            if (curLexState == REFERENCE)
  +            {
  +                inReference = false;
  +                stateStackPop();
  +            }
  +
               inDirective = true;
   
               if ( bDebugPrint_ )
  
  
  

Reply via email to