commons-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From hen...@apache.org
Subject svn commit: r1147694 - in /commons/proper/jexl/trunk: pom.xml src/site/xdoc/changes.xml src/site/xdoc/reference/syntax.xml
Date Sun, 17 Jul 2011 18:30:01 GMT
Author: henrib
Date: Sun Jul 17 18:30:00 2011
New Revision: 1147694

URL: http://svn.apache.org/viewvc?rev=1147694&view=rev
Log:
JEXL-114 , JEXL-113:
* Edited documentation and changes.xml
* Modified pom.xml for 2.1

Modified:
    commons/proper/jexl/trunk/pom.xml
    commons/proper/jexl/trunk/src/site/xdoc/changes.xml
    commons/proper/jexl/trunk/src/site/xdoc/reference/syntax.xml

Modified: commons/proper/jexl/trunk/pom.xml
URL: http://svn.apache.org/viewvc/commons/proper/jexl/trunk/pom.xml?rev=1147694&r1=1147693&r2=1147694&view=diff
==============================================================================
--- commons/proper/jexl/trunk/pom.xml (original)
+++ commons/proper/jexl/trunk/pom.xml Sun Jul 17 18:30:00 2011
@@ -24,7 +24,7 @@
     <modelVersion>4.0.0</modelVersion>
     <groupId>org.apache.commons</groupId>
     <artifactId>commons-jexl</artifactId>
-    <version>2.0.2-SNAPSHOT</version>
+    <version>2.1-SNAPSHOT</version>
     <name>Commons JEXL</name>
     <inceptionYear>2001</inceptionYear>
     <description>Jexl is an implementation of the JSTL Expression Language with extensions.</description>

Modified: commons/proper/jexl/trunk/src/site/xdoc/changes.xml
URL: http://svn.apache.org/viewvc/commons/proper/jexl/trunk/src/site/xdoc/changes.xml?rev=1147694&r1=1147693&r2=1147694&view=diff
==============================================================================
--- commons/proper/jexl/trunk/src/site/xdoc/changes.xml (original)
+++ commons/proper/jexl/trunk/src/site/xdoc/changes.xml Sun Jul 17 18:30:00 2011
@@ -25,7 +25,13 @@
     <author email="dev@commons.apache.org">Commons Developers</author>
   </properties>
   <body>
-    <release version="2.0.2" date="unreleased">
+    <release version="2.1" date="unreleased">
+        <action dev="henrib" type="add" issue="JEXL-114">
+            Allow scripts to create local variables // Add return keyword
+        </action>
+        <action dev="henrib" type="add" issue="JEXL-113" due-to="Max Tardiveau">
+            Add functions to extract which variables, parameters and local variables are
used to evaluate a script
+        </action>
         <action dev="henrib" type="fix" issue="JEXL-112" due-to="sebb">
             Cannot parse Integer.MIN_VALUE.
         </action>

Modified: commons/proper/jexl/trunk/src/site/xdoc/reference/syntax.xml
URL: http://svn.apache.org/viewvc/commons/proper/jexl/trunk/src/site/xdoc/reference/syntax.xml?rev=1147694&r1=1147693&r2=1147694&view=diff
==============================================================================
--- commons/proper/jexl/trunk/src/site/xdoc/reference/syntax.xml (original)
+++ commons/proper/jexl/trunk/src/site/xdoc/reference/syntax.xml Sun Jul 17 18:30:00 2011
@@ -78,7 +78,7 @@
             </p>
             <p>
               <strong>N.B.</strong> the following keywords are reserved, and
cannot be used as a variable name or property when using the dot operator:
-              <code>or and eq ne lt gt le ge div mod not null true false new</code>
+              <code>or and eq ne lt gt le ge div mod not null true false new var return</code>
               For example, the following is invalid:
               <source>my.new.dotted.var // invalid ('new' is keyword)</source>
               In such cases, the [ ] operator can be used, for example:
@@ -90,6 +90,22 @@
           <td>Scripts</td>
           <td>
             A script in Jexl is made up of zero or more statements. Scripts can be read from
a String, File or URL.
+            They can be created with named parameters which allow a later evaluation to be
performed with arguments.
+            A script returns the last expression evaluated by default.
+            Using the <code>return</code> keyword, a script will return the expression
that follows (or null).
+          </td>
+        </tr>
+        <tr>
+          <td>Local variables</td>
+          <td>Can be defined using the <code>var</code> keyword; their
identifying rules are the same as contextual variables.
+            <ul>
+              <li>Basic declaration: <code>var x;</code></li>
+              <li>Declaration with assignment: <code>var theAnswer = 42;</code></li>
+              <li>Invalid declaration: <code>var x.y;</code></li>
+            </ul>
+            Their scope is the entire script scope and they take precedence in resolution
over contextual variables.
+            When scripts are created with named parameters, those behave as local variables.
+            Local variables can not use <code>ant-style</code> naming, only one
identifier.
           </td>
         </tr>
         <tr>



Mime
View raw message