a6b1d59514bbeb3e2fba2c47bbe2e5aedef51457
[phpeclipse.git] / net.sourceforge.phpeclipse / src / net / sourceforge / phpdt / internal / compiler / codegen / ResetStateForCodeGenerationVisitor.java
1 /*******************************************************************************
2  * Copyright (c) 2000, 2001, 2002 International Business Machines Corp. and others.
3  * All rights reserved. This program and the accompanying materials 
4  * are made available under the terms of the Common Public License v0.5 
5  * which accompanies this distribution, and is available at
6  * http://www.eclipse.org/legal/cpl-v05.html
7  * 
8  * Contributors:
9  *     IBM Corporation - initial API and implementation
10  ******************************************************************************/
11 package net.sourceforge.phpdt.internal.compiler.codegen;
12
13 import net.sourceforge.phpdt.internal.compiler.AbstractSyntaxTreeVisitorAdapter;
14 import net.sourceforge.phpdt.internal.compiler.ast.BranchStatement;
15 import net.sourceforge.phpdt.internal.compiler.ast.DoStatement;
16 import net.sourceforge.phpdt.internal.compiler.ast.ForStatement;
17 import net.sourceforge.phpdt.internal.compiler.ast.LabeledStatement;
18 import net.sourceforge.phpdt.internal.compiler.ast.SwitchStatement;
19 import net.sourceforge.phpdt.internal.compiler.ast.WhileStatement;
20 import net.sourceforge.phpdt.internal.compiler.lookup.BlockScope;
21
22 public class ResetStateForCodeGenerationVisitor
23         extends AbstractSyntaxTreeVisitorAdapter {
24
25         public boolean visit(SwitchStatement statement, BlockScope scope) {
26                 statement.resetStateForCodeGeneration();
27                 return true;
28         }
29         
30         public boolean visit(ForStatement forStatement, BlockScope scope) {
31                 forStatement.resetStateForCodeGeneration();
32                 return true;
33         }
34         
35         public boolean visit(WhileStatement whileStatement, BlockScope scope) {
36                 whileStatement.resetStateForCodeGeneration();
37                 return true;
38         }
39
40         public boolean visit(LabeledStatement labeledStatement, BlockScope scope) {
41                 labeledStatement.resetStateForCodeGeneration();
42                 return true;
43         }
44
45         public boolean visit(DoStatement doStatement, BlockScope scope) {
46                 doStatement.resetStateForCodeGeneration();
47                 return true;
48         }
49
50         public boolean visit(BranchStatement branchStatement, BlockScope scope) {
51                 branchStatement.resetStateForCodeGeneration();
52                 return true;
53         }
54         
55 }
56