commons-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From hen...@apache.org
Subject svn commit: r810994 - in /commons/proper/jexl/branches/2.0/src: main/java/org/apache/commons/jexl/parser/Parser.jjt test/java/org/apache/commons/jexl/IssuesTest.java
Date Thu, 03 Sep 2009 15:30:53 GMT
Author: henrib
Date: Thu Sep  3 15:30:53 2009
New Revision: 810994

URL: http://svn.apache.org/viewvc?rev=810994&view=rev
Log:
Allow single line comment ## to behave like //; add test

Modified:
    commons/proper/jexl/branches/2.0/src/main/java/org/apache/commons/jexl/parser/Parser.jjt
    commons/proper/jexl/branches/2.0/src/test/java/org/apache/commons/jexl/IssuesTest.java

Modified: commons/proper/jexl/branches/2.0/src/main/java/org/apache/commons/jexl/parser/Parser.jjt
URL: http://svn.apache.org/viewvc/commons/proper/jexl/branches/2.0/src/main/java/org/apache/commons/jexl/parser/Parser.jjt?rev=810994&r1=810993&r2=810994&view=diff
==============================================================================
--- commons/proper/jexl/branches/2.0/src/main/java/org/apache/commons/jexl/parser/Parser.jjt
(original)
+++ commons/proper/jexl/branches/2.0/src/main/java/org/apache/commons/jexl/parser/Parser.jjt
Thu Sep  3 15:30:53 2009
@@ -83,7 +83,7 @@
 
 SKIP : /* WHITE SPACE */
 {
-  <COMMENT: ( "##" ( ~["\"","\n","\r"] )* ("\n" | "\r") ) >
+  <"##" (~["\n","\r"])* ("\n" | "\r" | "\r\n")? >
 | <"/*" (~["*"])* "*" ("*" | ~["*","/"] (~["*"])* "*")* "/">
 | <"//" (~["\n","\r"])* ("\n" | "\r" | "\r\n")? >
 | " "

Modified: commons/proper/jexl/branches/2.0/src/test/java/org/apache/commons/jexl/IssuesTest.java
URL: http://svn.apache.org/viewvc/commons/proper/jexl/branches/2.0/src/test/java/org/apache/commons/jexl/IssuesTest.java?rev=810994&r1=810993&r2=810994&view=diff
==============================================================================
--- commons/proper/jexl/branches/2.0/src/test/java/org/apache/commons/jexl/IssuesTest.java
(original)
+++ commons/proper/jexl/branches/2.0/src/test/java/org/apache/commons/jexl/IssuesTest.java
Thu Sep  3 15:30:53 2009
@@ -312,5 +312,9 @@
         assertEquals("hello world!", script.execute(ctxt));
         script = jexl.createScript("'hello world!';//commented\n'bye...'");
         assertEquals("bye...", script.execute(ctxt));
+        script = jexl.createScript("'hello world!'## commented");
+        assertEquals("hello world!", script.execute(ctxt));
+        script = jexl.createScript("'hello world!';## commented\n'bye...'");
+        assertEquals("bye...", script.execute(ctxt));
     }
 }



Mime
View raw message