geirm 02/03/24 16:42:49
Modified: src/java/org/apache/velocity/runtime/parser/node
ASTSetDirective.java
Log:
Fixed #7385 - coupled with changes in parser, now the = is only valid in
the #set() and == is the only thing valid in expressions
Revision Changes Path
1.21 +8 -4
jakarta-velocity/src/java/org/apache/velocity/runtime/parser/node/ASTSetDirective.java
Index: ASTSetDirective.java
===================================================================
RCS file:
/home/cvs/jakarta-velocity/src/java/org/apache/velocity/runtime/parser/node/ASTSetDirective.java,v
retrieving revision 1.20
retrieving revision 1.21
diff -u -r1.20 -r1.21
--- ASTSetDirective.java 22 Oct 2001 03:53:25 -0000 1.20
+++ ASTSetDirective.java 25 Mar 2002 00:42:49 -0000 1.21
@@ -73,7 +73,7 @@
*
* @author <a href="mailto:[EMAIL PROTECTED]">Jason van Zyl</a>
* @author <a href="mailto:[EMAIL PROTECTED]">Geir Magnusson Jr.</a>
- * @version $Id: ASTSetDirective.java,v 1.20 2001/10/22 03:53:25 jon Exp $
+ * @version $Id: ASTSetDirective.java,v 1.21 2002/03/25 00:42:49 geirm Exp $
*/
public class ASTSetDirective extends SimpleNode
{
@@ -101,7 +101,8 @@
/**
* simple init. We can get the RHS and LHS as the the tree structure is static
*/
- public Object init( InternalContextAdapter context, Object data) throws
Exception
+ public Object init(InternalContextAdapter context, Object data)
+ throws Exception
{
/*
* init the tree correctly
@@ -191,7 +192,9 @@
*/
private ASTReference getLeftHandSide()
{
- return (ASTReference) jjtGetChild(0).jjtGetChild(0).jjtGetChild(0);
+ return (ASTReference) jjtGetChild(0);
+
+ // return (ASTReference) jjtGetChild(0).jjtGetChild(0).jjtGetChild(0);
}
/**
@@ -199,6 +202,7 @@
*/
private Node getRightHandSide()
{
- return jjtGetChild(0).jjtGetChild(0).jjtGetChild(1).jjtGetChild(0);
+ return jjtGetChild(1);
+// return jjtGetChild(0).jjtGetChild(0).jjtGetChild(1).jjtGetChild(0);
}
}
--
To unsubscribe, e-mail: <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>