Rename HTML editor to Smarty editor
[phpeclipse.git] / net.sourceforge.phpeclipse / src / net / sourceforge / phpdt / internal / compiler / ast / Statement.java
index 3363777..08b01e4 100644 (file)
@@ -1,41 +1,35 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2001, 2002 International Business Machines Corp. and others.
+ * Copyright (c) 2000, 2003 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials 
- * are made available under the terms of the Common Public License v0.5 
+ * are made available under the terms of the Common Public License v1.0
  * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/cpl-v05.html
+ * http://www.eclipse.org/legal/cpl-v10.html
  * 
  * Contributors:
  *     IBM Corporation - initial API and implementation
- ******************************************************************************/
+ *******************************************************************************/
 package net.sourceforge.phpdt.internal.compiler.ast;
 
-import net.sourceforge.phpdt.internal.compiler.impl.*;
-import net.sourceforge.phpdt.internal.compiler.codegen.*;
-import net.sourceforge.phpdt.internal.compiler.flow.*;
-import net.sourceforge.phpdt.internal.compiler.lookup.*;
-import net.sourceforge.phpdt.internal.compiler.problem.*;
-import net.sourceforge.phpdt.internal.compiler.util.Util;
+import net.sourceforge.phpdt.internal.compiler.codegen.Label;
+import net.sourceforge.phpdt.internal.compiler.flow.FlowContext;
+import net.sourceforge.phpdt.internal.compiler.flow.FlowInfo;
+import net.sourceforge.phpdt.internal.compiler.impl.Constant;
+import net.sourceforge.phpdt.internal.compiler.lookup.BlockScope;
+import net.sourceforge.phpdt.internal.compiler.lookup.TypeBinding;
 
-public abstract class Statement extends AstNode {
+
+public abstract class Statement extends ASTNode {
        
        /**
         * Statement constructor comment.
-        */
+        */ 
        public Statement() {
                super();
        }
        
-       public FlowInfo analyseCode(
-               BlockScope currentScope,
-               FlowContext flowContext,
-               FlowInfo flowInfo) {
-               return flowInfo;
-       }
+       public abstract FlowInfo analyseCode(BlockScope currentScope, FlowContext flowContext, FlowInfo flowInfo);
        
-       public void generateCode(BlockScope currentScope, CodeStream codeStream) {
-               throw new ShouldNotImplement(Util.bind("ast.missingStatement")); //$NON-NLS-1$
-       }
+//     public abstract void generateCode(BlockScope currentScope, CodeStream codeStream);
        
        public boolean isEmptyBlock() {
                return false;
@@ -55,14 +49,14 @@ public abstract class Statement extends AstNode {
 
                return true;
        }
-       
-       public void resolve(BlockScope scope) {
+       public StringBuffer print(int indent, StringBuffer output) {
+               return printStatement(indent, output);
        }
+       public abstract StringBuffer printStatement(int indent, StringBuffer output);
+
+       public abstract void resolve(BlockScope scope);
        
-       public Constant resolveCase(
-               BlockScope scope,
-               TypeBinding testType,
-               SwitchStatement switchStatement) {
+       public Constant resolveCase(BlockScope scope, TypeBinding testType, SwitchStatement switchStatement) {
                // statement within a switch that are not case are treated as normal statement.... 
 
                resolve(scope);
@@ -78,4 +72,4 @@ public abstract class Statement extends AstNode {
         */
        public void branchChainTo(Label label) {
        }
-}
\ No newline at end of file
+}