Re: [JEXL] Blocks and an Expression

2006-02-28 Thread Dion Gillard
On 3/1/06, Rahul Akolkar <[EMAIL PROTECTED]> wrote: > > > So, the question becomes, should we support multiple statements for an > > expression (outside a block), or do we implement ASTJexlScript so that > it > > evaluates each of it's children in turn and returns the last value? > > > > > Neithe

Re: [JEXL] Blocks and an Expression

2006-02-28 Thread Rahul Akolkar
On 2/27/06, Dion Gillard <[EMAIL PROTECTED]> wrote: > Ok, I've found the cause of the problem. > > ExpressionFactory.createNewExpression on line 125 does this: > >SimpleNode node = (SimpleNode) tree.jjtGetChild(0); > > So only the first statement of the parsed expression is actually evaluat

Re: [JEXL] Blocks and an Expression

2006-02-27 Thread Dion Gillard
Ok, I've found the cause of the problem. ExpressionFactory.createNewExpression on line 125 does this: SimpleNode node = (SimpleNode) tree.jjtGetChild(0); So only the first statement of the parsed expression is actually evaluated. In the cases of the commented out tests, there are multip

Re: [JEXL] Blocks and an Expression

2006-02-27 Thread Rahul Akolkar
On 2/27/06, Dion Gillard <[EMAIL PROTECTED]> wrote: > On 2/28/06, Rahul Akolkar <[EMAIL PROTECTED]> wrote: > > > > Thanks for the recent changes Dion. The bit that is hazy (for me) is > > the relationship between an Expression and a "block" in the current > > impl. As demonstrated by the two failin

Re: [JEXL] Blocks and an Expression

2006-02-27 Thread Dion Gillard
On 2/28/06, Rahul Akolkar <[EMAIL PROTECTED]> wrote: > > Thanks for the recent changes Dion. The bit that is hazy (for me) is > the relationship between an Expression and a "block" in the current > impl. As demonstrated by the two failing test cases at the end of > BlockTest.java (and therefore, co

[JEXL] Blocks and an Expression

2006-02-27 Thread Rahul Akolkar
Thanks for the recent changes Dion. The bit that is hazy (for me) is the relationship between an Expression and a "block" in the current impl. As demonstrated by the two failing test cases at the end of BlockTest.java (and therefore, commented out) I think we may need to flesh out the semantics of