You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@commons.apache.org by "Henri Biestro (Created) (JIRA)" <ji...@apache.org> on 2012/01/30 12:03:10 UTC
[jira] [Created] (JEXL-127) Allow the creation of functions
Allow the creation of functions
-------------------------------
Key: JEXL-127
URL: https://issues.apache.org/jira/browse/JEXL-127
Project: Commons JEXL
Issue Type: Improvement
Reporter: Henri Biestro
Fix For: 3.0
As script get richer, being able to create functions is a strong need.
This only requires adding a new keyword ('function') and the syntax would be: var fn = function(x, y, z) {...}.
It would be nice to allow those to behave as closures (thru local variable hoistering).
This will bring JEXL closer to ECMAScript in functionality.
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] [Resolved] (JEXL-127) Allow the creation of functions
Posted by "Henri Biestro (Resolved) (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/JEXL-127?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Henri Biestro resolved JEXL-127.
--------------------------------
Resolution: Fixed
Assignee: Henri Biestro
Added support for 'function', includes variable hoisting"
pom.xml src/main/java/org/apache/commons/jexl3/JexlException.java src/main/java/org/apache/commons/jexl3/internal/Debugger.java src/main/java/org/apache/commons/jexl3/internal/Engine.java src/main/java/org/apache/commons/jexl3/internal/Frame.java src/main/java/org/apache/commons/jexl3/internal/Interpreter.java src/main/java/org/apache/commons/jexl3/internal/Scope.java src/main/java/org/apache/commons/jexl3/internal/Script.java src/main/java/org/apache/commons/jexl3/internal/TemplateEngine.java src/main/java/org/apache/commons/jexl3/parser/ASTJexlLambda.java src/main/java/org/apache/commons/jexl3/parser/ASTJexlScript.java src/main/java/org/apache/commons/jexl3/parser/JexlParser.java src/main/java/org/apache/commons/jexl3/parser/Parser.jjt src/test/java/org/apache/commons/jexl3/ArithmeticTest.java src/test/java/org/apache/commons/jexl3/ArrayAccessTest.java src/test/java/org/apache/commons/jexl3/ArrayLiteralTest.java src/test/java/org/apache/commons/jexl3/AssignTest.java src/test/java/org/apache/commons/jexl3/IssuesTest.java src/test/java/org/apache/commons/jexl3/JexlTest.java src/test/java/org/apache/commons/jexl3/LambdaTest.java src/test/java/org/apache/commons/jexl3/PropertyAccessTest.javĀ src/test/java/org/apache/commons/jexl3/parser/ParserTest.java
Committed revision 1243029.
> Allow the creation of functions
> -------------------------------
>
> Key: JEXL-127
> URL: https://issues.apache.org/jira/browse/JEXL-127
> Project: Commons JEXL
> Issue Type: Improvement
> Reporter: Henri Biestro
> Assignee: Henri Biestro
> Fix For: 3.0
>
>
> As script get richer, being able to create functions is a strong need.
> This only requires adding a new keyword ('function') and the syntax would be: var fn = function(x, y, z) {...}.
> It would be nice to allow those to behave as closures (thru local variable hoistering).
> This will bring JEXL closer to ECMAScript in functionality.
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] [Commented] (JEXL-127) Allow the creation of functions
Posted by "Henri Biestro (Commented) (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/JEXL-127?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13206176#comment-13206176 ]
Henri Biestro commented on JEXL-127:
------------------------------------
Moved Frame to Scope.Frame;
Refined exception handling;
Checkstyle
src/main/java/org/apache/commons/jexl3/JexlException.java
src/main/java/org/apache/commons/jexl3/internal/Engine.java
src/main/java/org/apache/commons/jexl3/internal/Frame.java
src/main/java/org/apache/commons/jexl3/internal/Interpreter.java
src/main/java/org/apache/commons/jexl3/internal/Scope.java
src/main/java/org/apache/commons/jexl3/internal/Script.java
src/main/java/org/apache/commons/jexl3/internal/TemplateEngine.java
src/main/java/org/apache/commons/jexl3/internal/introspection/Uberspect.java
src/main/java/org/apache/commons/jexl3/parser/ASTJexlLambda.java
src/main/java/org/apache/commons/jexl3/parser/ASTJexlScript.java
src/main/java/org/apache/commons/jexl3/parser/JexlParser.java
src/main/java/org/apache/commons/jexl3/parser/Parser.jjt
src/test/java/org/apache/commons/jexl3/ArithmeticTest.java
src/test/java/org/apache/commons/jexl3/IssuesTest.java
Committed revision 1243101.
> Allow the creation of functions
> -------------------------------
>
> Key: JEXL-127
> URL: https://issues.apache.org/jira/browse/JEXL-127
> Project: Commons JEXL
> Issue Type: Improvement
> Reporter: Henri Biestro
> Assignee: Henri Biestro
> Fix For: 3.0
>
>
> As script get richer, being able to create functions is a strong need.
> This only requires adding a new keyword ('function') and the syntax would be: var fn = function(x, y, z) {...}.
> It would be nice to allow those to behave as closures (thru local variable hoistering).
> This will bring JEXL closer to ECMAScript in functionality.
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] [Commented] (JEXL-127) Allow the creation of functions
Posted by "Henri Biestro (Commented) (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/JEXL-127?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13228432#comment-13228432 ]
Henri Biestro commented on JEXL-127:
------------------------------------
Reworked grammar to properly treat parenthesized expressions and calling chains;
Added 'anonymous/closure' style syntax to functions '(x, y)-> { ... }';
Made additive operations separate nodes / classes;
Renamed occurences of 'register' to symbol (Scope/Frame);
Code shuffling in Interpreter to have all complex methods located together (assign, call, de-reference...);
Added syntactic detection of invalid assignment (left member must be left value);
Moved JexlEvalContext to test package (only use is testing);
Renamed 'UnifiedJEXLTest' to 'JXLTTest' to properly reflect new naming;
Added / completed a few tests;
Various checkstyle / Javadoc
Committed revision 1300178.
Sending jexl3/trunk/pom.xml
Deleting jexl3/trunk/src/main/java/org/apache/commons/jexl3/JexlEvalContext.java
Sending jexl3/trunk/src/main/java/org/apache/commons/jexl3/internal/Debugger.java
Sending jexl3/trunk/src/main/java/org/apache/commons/jexl3/internal/Engine.java
Sending jexl3/trunk/src/main/java/org/apache/commons/jexl3/internal/Interpreter.java
Sending jexl3/trunk/src/main/java/org/apache/commons/jexl3/internal/Scope.java
Sending jexl3/trunk/src/main/java/org/apache/commons/jexl3/internal/introspection/Permissions.java
Sending jexl3/trunk/src/main/java/org/apache/commons/jexl3/parser/ASTIdentifier.java
Adding jexl3/trunk/src/main/java/org/apache/commons/jexl3/parser/ASTIdentifierAccess.java
Sending jexl3/trunk/src/main/java/org/apache/commons/jexl3/parser/ASTJexlScript.java
Sending jexl3/trunk/src/main/java/org/apache/commons/jexl3/parser/ASTReferenceExpression.java
Sending jexl3/trunk/src/main/java/org/apache/commons/jexl3/parser/JexlNode.java
Sending jexl3/trunk/src/main/java/org/apache/commons/jexl3/parser/JexlParser.java
Sending jexl3/trunk/src/main/java/org/apache/commons/jexl3/parser/Parser.jjt
Sending jexl3/trunk/src/main/java/org/apache/commons/jexl3/parser/ParserVisitor.java
Sending jexl3/trunk/src/test/java/org/apache/commons/jexl3/ArrayAccessTest.java
Sending jexl3/trunk/src/test/java/org/apache/commons/jexl3/AssignTest.java
Sending jexl3/trunk/src/test/java/org/apache/commons/jexl3/CacheTest.java
Sending jexl3/trunk/src/test/java/org/apache/commons/jexl3/ClassCreatorTest.java
Sending jexl3/trunk/src/test/java/org/apache/commons/jexl3/IfTest.java
Sending jexl3/trunk/src/test/java/org/apache/commons/jexl3/IssuesTest.java
Adding jexl3/trunk/src/test/java/org/apache/commons/jexl3/JXLTTest.java
Adding jexl3/trunk/src/test/java/org/apache/commons/jexl3/JexlEvalContext.java
Sending jexl3/trunk/src/test/java/org/apache/commons/jexl3/JexlTest.java
Sending jexl3/trunk/src/test/java/org/apache/commons/jexl3/LambdaTest.java
Sending jexl3/trunk/src/test/java/org/apache/commons/jexl3/MethodTest.java
Sending jexl3/trunk/src/test/java/org/apache/commons/jexl3/ScriptCallableTest.java
Deleting jexl3/trunk/src/test/java/org/apache/commons/jexl3/UnifiedJEXLTest.java
Sending jexl3/trunk/src/test/java/org/apache/commons/jexl3/VarTest.java
Sending jexl3/trunk/src/test/java/org/apache/commons/jexl3/internal/Util.java
Sending jexl3/trunk/src/test/java/org/apache/commons/jexl3/junit/Asserter.java
> Allow the creation of functions
> -------------------------------
>
> Key: JEXL-127
> URL: https://issues.apache.org/jira/browse/JEXL-127
> Project: Commons JEXL
> Issue Type: Improvement
> Reporter: Henri Biestro
> Assignee: Henri Biestro
> Fix For: 3.0
>
>
> As script get richer, being able to create functions is a strong need.
> This only requires adding a new keyword ('function') and the syntax would be: var fn = function(x, y, z) {...}.
> It would be nice to allow those to behave as closures (thru local variable hoistering).
> This will bring JEXL closer to ECMAScript in functionality.
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira