/******************************************************************************* * Copyright (c) 2000, 2001, 2002 International Business Machines Corp. and others. * All rights reserved. This program and the accompanying materials * are made available under the terms of the Common Public License v0.5 * which accompanies this distribution, and is available at * http://www.eclipse.org/legal/cpl-v05.html * * Contributors: * IBM Corporation - initial API and implementation ******************************************************************************/ package net.sourceforge.phpdt.internal.compiler.codegen; import net.sourceforge.phpdt.internal.compiler.AbstractSyntaxTreeVisitorAdapter; import net.sourceforge.phpdt.internal.compiler.ast.BranchStatement; import net.sourceforge.phpdt.internal.compiler.ast.DoStatement; import net.sourceforge.phpdt.internal.compiler.ast.ForStatement; import net.sourceforge.phpdt.internal.compiler.ast.LabeledStatement; import net.sourceforge.phpdt.internal.compiler.ast.SwitchStatement; import net.sourceforge.phpdt.internal.compiler.ast.WhileStatement; import net.sourceforge.phpdt.internal.compiler.lookup.BlockScope; public class ResetStateForCodeGenerationVisitor extends AbstractSyntaxTreeVisitorAdapter { public boolean visit(SwitchStatement statement, BlockScope scope) { statement.resetStateForCodeGeneration(); return true; } public boolean visit(ForStatement forStatement, BlockScope scope) { forStatement.resetStateForCodeGeneration(); return true; } public boolean visit(WhileStatement whileStatement, BlockScope scope) { whileStatement.resetStateForCodeGeneration(); return true; } public boolean visit(LabeledStatement labeledStatement, BlockScope scope) { labeledStatement.resetStateForCodeGeneration(); return true; } public boolean visit(DoStatement doStatement, BlockScope scope) { doStatement.resetStateForCodeGeneration(); return true; } public boolean visit(BranchStatement branchStatement, BlockScope scope) { branchStatement.resetStateForCodeGeneration(); return true; } }