velocity-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From cbris...@apache.org
Subject svn commit: r1768603 - /velocity/engine/trunk/velocity-engine-core/src/main/parser/Parser.jjt
Date Mon, 07 Nov 2016 22:31:44 GMT
Author: cbrisson
Date: Mon Nov  7 22:31:44 2016
New Revision: 1768603

URL: http://svn.apache.org/viewvc?rev=1768603&view=rev
Log:
[engine] fix parser bug for VTL like:

  #foo()##
  #set($foo=$bar)



Modified:
    velocity/engine/trunk/velocity-engine-core/src/main/parser/Parser.jjt

Modified: velocity/engine/trunk/velocity-engine-core/src/main/parser/Parser.jjt
URL: http://svn.apache.org/viewvc/velocity/engine/trunk/velocity-engine-core/src/main/parser/Parser.jjt?rev=1768603&r1=1768602&r2=1768603&view=diff
==============================================================================
--- velocity/engine/trunk/velocity-engine-core/src/main/parser/Parser.jjt (original)
+++ velocity/engine/trunk/velocity-engine-core/src/main/parser/Parser.jjt Mon Nov  7 22:31:44
2016
@@ -885,6 +885,11 @@ TOKEN :
   {
      inComment = false;
      stateStackPop();
+     if (curLexState == REFERENCE || curLexState == REFMOD3)
+     {
+       // end of reference: pop again
+       stateStackPop();
+     }
   }
 
 }
@@ -896,6 +901,11 @@ TOKEN :
   {
     inComment = false;
     stateStackPop();
+     if (curLexState == REFERENCE || curLexState == REFMOD3)
+     {
+       // end of reference: pop again
+       stateStackPop();
+     }
   }
 }
 
@@ -906,6 +916,11 @@ TOKEN :
   {
     inComment = false;
     stateStackPop();
+     if (curLexState == REFERENCE || curLexState == REFMOD3)
+     {
+       // end of reference: pop again
+       stateStackPop();
+     }
   }
 }
 



Mime
View raw message