Skip to main content
aboutsummaryrefslogtreecommitdiffstats
blob: e93b49deff145db0b77d9fc8042e05f992e27a95 (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
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
/*******************************************************************************
 * Copyright (c) 2003, 2004 IBM Corporation and others.
 * All rights reserved. This program and the accompanying materials
 * are made available under the terms of the Common Public License v1.0
 * which accompanies this distribution, and is available at
 * http://www.eclipse.org/legal/cpl-v10.html
 * 
 * Contributors:
 *     IBM Corporation - initial API and implementation
 *******************************************************************************/
package org.eclipse.cdt.core.parser.extension;

import org.eclipse.cdt.core.parser.IToken;
import org.eclipse.cdt.core.parser.KeywordSetKey;
import org.eclipse.cdt.core.parser.ParserLanguage;
import org.eclipse.cdt.core.parser.ast.ASTPointerOperator;
import org.eclipse.cdt.core.parser.ast.IASTDesignator;
import org.eclipse.cdt.core.parser.ast.IASTExpression;
import org.eclipse.cdt.core.parser.ast.IASTScope;
import org.eclipse.cdt.core.parser.ast.IASTCompletionNode.CompletionKind;
import org.eclipse.cdt.internal.core.parser.DeclarationWrapper;
import org.eclipse.cdt.internal.core.parser.IParserData;
import org.eclipse.cdt.internal.core.parser.Parser;


/**
 * @author jcamelon
 */
public interface IParserExtension {
	
	public boolean isValidCVModifier( ParserLanguage language, int tokenType );
	public ASTPointerOperator getPointerOperator( ParserLanguage language, int tokenType );
	
	public boolean isValidUnaryExpressionStart( int tokenType );
	public IASTExpression parseUnaryExpression( IASTScope scope, IParserData data, CompletionKind kind, KeywordSetKey key );
	
	public boolean isValidRelationalExpressionStart( ParserLanguage language, int tokenType );
	public IASTExpression parseRelationalExpression( IASTScope scope, IParserData data, CompletionKind kind, KeywordSetKey key, IASTExpression lhsExpression );
	/**
	 * @param i
	 * @return
	 */
	public boolean canHandleDeclSpecifierSequence(int tokenType );
	public interface IDeclSpecifierExtensionResult
	{
		public IToken			  getFirstToken();
		public IToken			  getLastToken();
		public Parser.Flags 	  getFlags();
	}
	
	/**
	 * @param parser
	 * @param flags
	 * @param sdw
	 * @param key TODO
	 * @return TODO
	 */
	public IDeclSpecifierExtensionResult parseDeclSpecifierSequence(IParserData parser, Parser.Flags flags, DeclarationWrapper sdw, CompletionKind kind, KeywordSetKey key );
	/**
	 * @param i
	 * @return
	 */
	public boolean canHandleCDesignatorInitializer(int tokenType);
	/**
	 * @param parserData
	 * @param scope TODO
	 * @return
	 */
	public IASTDesignator parseDesignator(IParserData parserData, IASTScope scope);
}

Back to the top