mirror of
https://github.com/eclipse-cdt/cdt
synced 2025-08-03 14:25:37 +02:00
Bug 299495: Visiting if-statements.
This commit is contained in:
parent
b9a6ef638c
commit
6dd1f6b242
2 changed files with 9 additions and 7 deletions
|
@ -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
|
||||
* are made available under the terms of the Eclipse Public License v1.0
|
||||
* which accompanies this distribution, and is available at
|
||||
* http://www.eclipse.org/legal/epl-v10.html
|
||||
*
|
||||
* Contributors:
|
||||
* IBM Rational Software - Initial API and implementation
|
||||
* Yuan Zhang / Beth Tibbitts (IBM Research)
|
||||
* John Camelon (IBM Rational Software) - Initial API and implementation
|
||||
* Yuan Zhang / Beth Tibbitts (IBM Research)
|
||||
* Markus Schorn (Wind River Systems)
|
||||
*******************************************************************************/
|
||||
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;
|
||||
|
||||
/**
|
||||
* @author jcamelon
|
||||
* If statements for C.
|
||||
*/
|
||||
public class CASTIfStatement extends ASTNode implements IASTIfStatement, IASTAmbiguityParent {
|
||||
|
||||
|
@ -107,7 +108,7 @@ public class CASTIfStatement extends ASTNode implements IASTIfStatement, IASTAmb
|
|||
IASTIfStatement stmt= this;
|
||||
loop: for(;;) {
|
||||
if (action.shouldVisitStatements) {
|
||||
switch (action.visit(this)) {
|
||||
switch (action.visit(stmt)) {
|
||||
case ASTVisitor.PROCESS_ABORT: return false;
|
||||
case ASTVisitor.PROCESS_SKIP:
|
||||
stmt= null;
|
||||
|
|
|
@ -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
|
||||
* are made available under the terms of the Eclipse Public License v1.0
|
||||
* which accompanies this distribution, and is available at
|
||||
|
@ -7,6 +7,7 @@
|
|||
*
|
||||
* Contributors:
|
||||
* John Camelon (IBM) - Initial API and implementation
|
||||
* Markus Schorn (Wind River Systems)
|
||||
*******************************************************************************/
|
||||
package org.eclipse.cdt.internal.core.dom.parser.cpp;
|
||||
|
||||
|
@ -114,7 +115,7 @@ public class CPPASTIfStatement extends ASTNode implements ICPPASTIfStatement, IA
|
|||
ICPPASTIfStatement stmt= this;
|
||||
loop: for(;;) {
|
||||
if (action.shouldVisitStatements) {
|
||||
switch (action.visit(this)) {
|
||||
switch (action.visit(stmt)) {
|
||||
case ASTVisitor.PROCESS_ABORT: return false;
|
||||
case ASTVisitor.PROCESS_SKIP:
|
||||
stmt= null;
|
||||
|
|
Loading…
Add table
Reference in a new issue