geirm 01/01/02 21:23:22
Modified: src/java/org/apache/velocity/runtime/parser/node
ASTAddNode.java ASTAndNode.java ASTAssignment.java
Log:
AST changes to support the new context stuff. This is the ASTA* classes (so we
don't get all at once...)
Revision Changes Path
1.3 +3 -3
jakarta-velocity/src/java/org/apache/velocity/runtime/parser/node/ASTAddNode.java
Index: ASTAddNode.java
===================================================================
RCS file:
/home/cvs/jakarta-velocity/src/java/org/apache/velocity/runtime/parser/node/ASTAddNode.java,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -r1.2 -r1.3
--- ASTAddNode.java 2000/12/27 14:31:52 1.2
+++ ASTAddNode.java 2001/01/03 05:23:22 1.3
@@ -63,12 +63,12 @@
*
* @author <a href="mailto:[EMAIL PROTECTED]">Jason van Zyl</a>
* @author <a href="mailto:[EMAIL PROTECTED]">Geir Magnusson Jr.</a>
- * @version $Id: ASTAddNode.java,v 1.2 2000/12/27 14:31:52 geirm Exp $
+ * @version $Id: ASTAddNode.java,v 1.3 2001/01/03 05:23:22 geirm Exp $
*/
package org.apache.velocity.runtime.parser.node;
-import org.apache.velocity.Context;
+import org.apache.velocity.context.InternalContextAdapter;
import org.apache.velocity.runtime.Runtime;
import org.apache.velocity.runtime.parser.Parser;
@@ -95,7 +95,7 @@
* supported.
* @return Integer object with value, or null
*/
- public Object value(Context context)
+ public Object value( InternalContextAdapter context)
{
/*
* get the two addends
1.3 +4 -3
jakarta-velocity/src/java/org/apache/velocity/runtime/parser/node/ASTAndNode.java
Index: ASTAndNode.java
===================================================================
RCS file:
/home/cvs/jakarta-velocity/src/java/org/apache/velocity/runtime/parser/node/ASTAndNode.java,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -r1.2 -r1.3
--- ASTAndNode.java 2000/12/28 17:23:13 1.2
+++ ASTAndNode.java 2001/01/03 05:23:22 1.3
@@ -60,12 +60,12 @@
*
* @author <a href="mailto:[EMAIL PROTECTED]">Jason van Zyl</a>
* @author <a href="mailto:[EMAIL PROTECTED]">Geir Magnusson Jr.</a>
- * @version $Id: ASTAndNode.java,v 1.2 2000/12/28 17:23:13 geirm Exp $
+ * @version $Id: ASTAndNode.java,v 1.3 2001/01/03 05:23:22 geirm Exp $
*/
package org.apache.velocity.runtime.parser.node;
-import org.apache.velocity.Context;
+import org.apache.velocity.context.InternalContextAdapter;
import org.apache.velocity.runtime.parser.Parser;
public class ASTAndNode extends SimpleNode
@@ -92,7 +92,7 @@
* left && null = false
* null && null = false
*/
- public boolean evaluate(Context context)
+ public boolean evaluate( InternalContextAdapter context)
{
Node left = jjtGetChild(0);
Node right = jjtGetChild(1);
@@ -105,3 +105,4 @@
return false;
}
}
+
1.2 +55 -1
jakarta-velocity/src/java/org/apache/velocity/runtime/parser/node/ASTAssignment.java
Index: ASTAssignment.java
===================================================================
RCS file:
/home/cvs/jakarta-velocity/src/java/org/apache/velocity/runtime/parser/node/ASTAssignment.java,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- ASTAssignment.java 2000/10/20 19:14:01 1.1
+++ ASTAssignment.java 2001/01/03 05:23:22 1.2
@@ -1,8 +1,62 @@
/* Generated By:JJTree: Do not edit this line. ASTAssignment.java */
+/*
+ * The Apache Software License, Version 1.1
+ *
+ * Copyright (c) 2000 The Apache Software Foundation. All rights
+ * reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ *
+ * 1. Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ *
+ * 2. Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in
+ * the documentation and/or other materials provided with the
+ * distribution.
+ *
+ * 3. The end-user documentation included with the redistribution, if
+ * any, must include the following acknowlegement:
+ * "This product includes software developed by the
+ * Apache Software Foundation (http://www.apache.org/)."
+ * Alternately, this acknowlegement may appear in the software itself,
+ * if and wherever such third-party acknowlegements normally appear.
+ *
+ * 4. The names "The Jakarta Project", "Tomcat", and "Apache Software
+ * Foundation" must not be used to endorse or promote products derived
+ * from this software without prior written permission. For written
+ * permission, please contact [EMAIL PROTECTED]
+ *
+ * 5. Products derived from this software may not be called "Apache"
+ * nor may "Apache" appear in their names without prior written
+ * permission of the Apache Group.
+ *
+ * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
+ * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
+ * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+ * DISCLAIMED. IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR
+ * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+ * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+ * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
+ * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+ * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+ * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
+ * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+ * SUCH DAMAGE.
+ * ====================================================================
+ *
+ * This software consists of voluntary contributions made by many
+ * individuals on behalf of the Apache Software Foundation. For more
+ * information on the Apache Software Foundation, please see
+ * <http://www.apache.org/>.
+ */
+
package org.apache.velocity.runtime.parser.node;
-import org.apache.velocity.runtime.parser.*;
+import org.apache.velocity.runtime.parser.Parser;
public class ASTAssignment extends SimpleNode
{