Skip to main content
aboutsummaryrefslogtreecommitdiffstats
blob: ba3783ac3345bfeab7febc121baedc1f6e3e8f14 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
/*******************************************************************************
 * Copyright (c) 2009 Wind River Systems, Inc. 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:
 *    Markus Schorn - initial API and implementation
 *******************************************************************************/ 
package org.eclipse.cdt.internal.core.dom.parser.c;

import org.eclipse.cdt.core.dom.ast.ASTVisitor;
import org.eclipse.cdt.internal.core.dom.parser.ASTAmbiguousNode;

/**
 * Visitor to resolve ast ambiguities in the right order, which is simply a depth
 * first traversal.
 */
final class CASTAmbiguityResolver extends ASTVisitor {
	CASTAmbiguityResolver() {
		super(false);
		shouldVisitAmbiguousNodes= true;
	}

	@Override
	public int visit(ASTAmbiguousNode astAmbiguousNode) {
		astAmbiguousNode.resolveAmbiguity(this);
		return PROCESS_SKIP;
	}
}

Back to the top