Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [cdt-dev] How to add Keyword to CDT Parser

Hi Sebastian,

Thanks for your suggestion. I did what you mentioned and now my class looks
like below:

public class NCScannerExtensionConfiguration extends
		GCCScannerExtensionConfiguration {
        public static final String CSTATUS = "_c_status";			
	public static final char[] extendcCSTATUS = "_c_status".toCharArray();
	
	public NsCppScannerExtensionConfiguration() {
		addKeyword(extendcCSTATUS, IGCCToken.tIDENTIFIER );
	}
	
	public NsCppScannerExtensionConfiguration(int version) {
		super(version);		
		addKeyword(extendcCSTATUS, IGCCToken.tIDENTIFIER );
	}

	public CharArrayIntMap getAdditionalKeywords() {
		CharArrayIntMap additionalCKeywords = new CharArrayIntMap(0, 0); 
		additionalCKeywords.put(
NCScannerExtensionConfiguration.extendcppCCSTATUS, IToken.t_class); 
		return additionalCKeywords;
	}
}

Still the keyword is not getting detected. In the outline view it is shown
as a variable. Is there something i am not doing right?

Thanks once again.

Anitha



--
View this message in context: http://eclipse.1072660.n5.nabble.com/How-to-add-Keyword-to-CDT-Parser-tp166002p166030.html
Sent from the Eclipse CDT - Development mailing list archive at Nabble.com.


Back to the top