Details
-
Bug
-
Status: Closed
-
Major
-
Resolution: Fixed
-
1.0
-
None
-
Operating System: other
Platform: Other
-
32110
Description
I've successfully used JEXL in a project I'm working on at the moment. We
needed a flexible rule engine, with simple but powerful expressions, and
JEXL proofed to be just that.
There was one minor flaw in JEXL: It support expressions, but does not
support assignments.
For example, the following expression did not work:
a = 1+2;
(Although the grammar is ready for it...)
I've attached a cvs diff, with my additions to ASTAssignment,
ASTStatementExpression and ASTReferenceExpression. Mostly, my changes
involve implementing the 'value' method. ASTAssignment now actually tries to
assign a value to a reference variable.
It is possible that I've misinterpreted the evaluation/visitor pattern, but
the changes worked for me.
I hope that you'll find my additions of any use.
With kind regards,
Barry