Package org.eclipse.cdt.core.dom.parser
Class AbstractScannerExtensionConfiguration
java.lang.Object
org.eclipse.cdt.core.dom.parser.AbstractScannerExtensionConfiguration
- All Implemented Interfaces:
IScannerExtensionConfiguration
- Direct Known Subclasses:
GNUScannerExtensionConfiguration
public abstract class AbstractScannerExtensionConfiguration
extends Object
implements IScannerExtensionConfiguration
Abstract scanner extension configuration to help model C/C++ dialects.
- Since:
- 4.0
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionprotected static class -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected voidaddKeyword(char[] name, int tokenKind) Adds a keyword to the map of additional keywords.protected voidAdds a macro to the list of additional macros.protected voidaddPreprocessorKeyword(char[] name, int tokenKind) Adds a preprocessor keyword to the map of additional preprocessor keywords.protected static IMacrocreateFunctionStyleMacro(String name, String value, String[] arguments) Deprecated.protected static IMacrocreateMacro(String signature, String value) Deprecated.Support for additional keywords.IMacro[]Support for additional macros.Support for additional preprocessor directives.booleanDeprecated.booleanSupport for GNU extension "Dollar Signs in Identifier Names".char[]Support for additional numeric literal suffix characters, like e.g.booleanSupport for extension "At Signs in Identifier Names".booleanSupport for C++14 digit separators in integer literalsbooleanSupport for (deprecated) GNU minimum and maximum operators (<?and>?).booleanSupport for C++ raw string literals.booleanSupport for block-comments comments using /% %/.booleanSupport for User Defined Literals such as 123_suffixbooleanSupport for UTF string literals.
-
Constructor Details
-
AbstractScannerExtensionConfiguration
public AbstractScannerExtensionConfiguration()
-
-
Method Details
-
support$InIdentifiers
public boolean support$InIdentifiers()Description copied from interface:IScannerExtensionConfigurationSupport for GNU extension "Dollar Signs in Identifier Names".- Specified by:
support$InIdentifiersin interfaceIScannerExtensionConfiguration- Returns:
true, if $ should be supported in identifiers- See Also:
-
supportAtSignInIdentifiers
public boolean supportAtSignInIdentifiers()Support for extension "At Signs in Identifier Names". If enabled, the '@' sign is treated as part of identifiers.- Specified by:
supportAtSignInIdentifiersin interfaceIScannerExtensionConfiguration- Returns:
true, if @ should be supported in identifiers- Since:
- 5.1
-
supportUTFLiterals
public boolean supportUTFLiterals()Support for UTF string literals.- Specified by:
supportUTFLiteralsin interfaceIScannerExtensionConfiguration- Since:
- 5.1
- See Also:
-
supportSlashPercentComments
public boolean supportSlashPercentComments()Support for block-comments comments using /% %/.- Specified by:
supportSlashPercentCommentsin interfaceIScannerExtensionConfiguration- Returns:
true, if /% should be interpreted as the start of a block-comment which is ended by %/- Since:
- 5.1
-
supportAdditionalNumericLiteralSuffixes
public char[] supportAdditionalNumericLiteralSuffixes()Description copied from interface:IScannerExtensionConfigurationSupport for additional numeric literal suffix characters, like e.g. 'i' and 'j' for GNU Complex number literals.- Specified by:
supportAdditionalNumericLiteralSuffixesin interfaceIScannerExtensionConfiguration- Returns:
- an array of chars or
null, if no additional suffixes should be allowed - See Also:
-
supportMinAndMaxOperators
public boolean supportMinAndMaxOperators()Description copied from interface:IScannerExtensionConfigurationSupport for (deprecated) GNU minimum and maximum operators (<?and>?).- Specified by:
supportMinAndMaxOperatorsin interfaceIScannerExtensionConfiguration- Returns:
trueif support for the extension should be enabled- See Also:
-
supportRawStringLiterals
public boolean supportRawStringLiterals()Description copied from interface:IScannerExtensionConfigurationSupport for C++ raw string literals.- Specified by:
supportRawStringLiteralsin interfaceIScannerExtensionConfiguration- Since:
- 5.5
-
supportUserDefinedLiterals
public boolean supportUserDefinedLiterals()Support for User Defined Literals such as 123_suffix- Specified by:
supportUserDefinedLiteralsin interfaceIScannerExtensionConfiguration- Since:
- 5.11
-
supportDigitSeparators
public boolean supportDigitSeparators()Description copied from interface:IScannerExtensionConfigurationSupport for C++14 digit separators in integer literals- Specified by:
supportDigitSeparatorsin interfaceIScannerExtensionConfiguration
-
getAdditionalPreprocessorKeywords
Description copied from interface:IScannerExtensionConfigurationSupport for additional preprocessor directives.- Specified by:
getAdditionalPreprocessorKeywordsin interfaceIScannerExtensionConfiguration- Returns:
- a mapping of preprocessor directive keyword to one of the
constants defined in
IPreprocessorDirectiveornullfor no additional keywords.
-
getAdditionalKeywords
Description copied from interface:IScannerExtensionConfigurationSupport for additional keywords.- Specified by:
getAdditionalKeywordsin interfaceIScannerExtensionConfiguration- Returns:
- a mapping of keyword name to one of the constants defined in
ITokenornullfor no additional keywords.
-
getAdditionalMacros
Description copied from interface:IScannerExtensionConfigurationSupport for additional macros.- Specified by:
getAdditionalMacrosin interfaceIScannerExtensionConfiguration- Returns:
- an array of macros or
nullfor no additional macros.
-
addMacro
Adds a macro to the list of additional macros. The macro can either be of object- or of function-style.Example: addMacro("max(a,b)", "(((a)>(b) ? (a) : (b))");- Parameters:
signature- the signature of the macro, seeIMacro.getSignature().value- the macro value- Since:
- 5.1
-
addPreprocessorKeyword
protected void addPreprocessorKeyword(char[] name, int tokenKind) Adds a preprocessor keyword to the map of additional preprocessor keywords.- Parameters:
name- the name of the keywordtokenKind- the kind of token the keyword is mapped to. SeeIToken.- Since:
- 5.1
-
addKeyword
protected void addKeyword(char[] name, int tokenKind) Adds a keyword to the map of additional keywords.- Parameters:
name- the name of the keywordtokenKind- the kind of token the keyword is mapped to. SeeIToken.- Since:
- 5.1
-
createMacro
Deprecated. -
createFunctionStyleMacro
@Deprecated protected static IMacro createFunctionStyleMacro(String name, String value, String[] arguments) Deprecated. -
initializeMacroValuesTo1
Deprecated.- Specified by:
initializeMacroValuesTo1in interfaceIScannerExtensionConfiguration
-
addMacro(String, String)