1
0
Fork 0
mirror of https://github.com/eclipse-cdt/cdt synced 2025-08-05 23:35:48 +02:00

Bug 299495: Visiting if-statements.

This commit is contained in:
Markus Schorn 2010-01-13 16:06:01 +00:00
parent b9a6ef638c
commit 6dd1f6b242
2 changed files with 9 additions and 7 deletions

View file

@ -1,13 +1,14 @@
/******************************************************************************* /*******************************************************************************
* Copyright (c) 2005, 2008 IBM Corporation and others. * Copyright (c) 2005, 2010 IBM Corporation and others.
* All rights reserved. This program and the accompanying materials * All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0 * are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at * which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v10.html * http://www.eclipse.org/legal/epl-v10.html
* *
* Contributors: * Contributors:
* IBM Rational Software - Initial API and implementation * John Camelon (IBM Rational Software) - Initial API and implementation
* Yuan Zhang / Beth Tibbitts (IBM Research) * Yuan Zhang / Beth Tibbitts (IBM Research)
* Markus Schorn (Wind River Systems)
*******************************************************************************/ *******************************************************************************/
package org.eclipse.cdt.internal.core.dom.parser.c; package org.eclipse.cdt.internal.core.dom.parser.c;
@ -20,7 +21,7 @@ import org.eclipse.cdt.internal.core.dom.parser.ASTNode;
import org.eclipse.cdt.internal.core.dom.parser.IASTAmbiguityParent; import org.eclipse.cdt.internal.core.dom.parser.IASTAmbiguityParent;
/** /**
* @author jcamelon * If statements for C.
*/ */
public class CASTIfStatement extends ASTNode implements IASTIfStatement, IASTAmbiguityParent { public class CASTIfStatement extends ASTNode implements IASTIfStatement, IASTAmbiguityParent {
@ -107,7 +108,7 @@ public class CASTIfStatement extends ASTNode implements IASTIfStatement, IASTAmb
IASTIfStatement stmt= this; IASTIfStatement stmt= this;
loop: for(;;) { loop: for(;;) {
if (action.shouldVisitStatements) { if (action.shouldVisitStatements) {
switch (action.visit(this)) { switch (action.visit(stmt)) {
case ASTVisitor.PROCESS_ABORT: return false; case ASTVisitor.PROCESS_ABORT: return false;
case ASTVisitor.PROCESS_SKIP: case ASTVisitor.PROCESS_SKIP:
stmt= null; stmt= null;

View file

@ -1,5 +1,5 @@
/******************************************************************************* /*******************************************************************************
* Copyright (c) 2004, 2009 IBM Corporation and others. * Copyright (c) 2004, 2010 IBM Corporation and others.
* All rights reserved. This program and the accompanying materials * All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0 * are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at * which accompanies this distribution, and is available at
@ -7,6 +7,7 @@
* *
* Contributors: * Contributors:
* John Camelon (IBM) - Initial API and implementation * John Camelon (IBM) - Initial API and implementation
* Markus Schorn (Wind River Systems)
*******************************************************************************/ *******************************************************************************/
package org.eclipse.cdt.internal.core.dom.parser.cpp; package org.eclipse.cdt.internal.core.dom.parser.cpp;
@ -114,7 +115,7 @@ public class CPPASTIfStatement extends ASTNode implements ICPPASTIfStatement, IA
ICPPASTIfStatement stmt= this; ICPPASTIfStatement stmt= this;
loop: for(;;) { loop: for(;;) {
if (action.shouldVisitStatements) { if (action.shouldVisitStatements) {
switch (action.visit(this)) { switch (action.visit(stmt)) {
case ASTVisitor.PROCESS_ABORT: return false; case ASTVisitor.PROCESS_ABORT: return false;
case ASTVisitor.PROCESS_SKIP: case ASTVisitor.PROCESS_SKIP:
stmt= null; stmt= null;