public class CPreprocessor extends ConditionalHandlingCPreprocessorBase
Modifier and Type | Field and Description |
---|---|
static java.util.regex.Pattern |
INCLUDE_PATTERN
Patterns used for parsing include statements.
|
IS_MACRO_TOKEN, MACRO_ORIGIN, macroProvider
Constructor and Description |
---|
CPreprocessor(IMacroProvider macroProvider)
Constructor.
|
Modifier and Type | Method and Description |
---|---|
protected void |
handleInclude(java.lang.String uniformPath,
IToken token,
java.util.List<IToken> result,
int inclusionLimit,
java.util.Set<java.lang.String> seenPaths)
Handles the include directive.
|
static void |
removePreprocessorTokens(java.util.List<ShallowEntity> entities)
A post processing operation that removes all tokens that have been inserted
by the C++ preprocessor as result of the macro expansion.
|
protected Pair<java.lang.String,java.lang.String> |
resolveIncludeContent(java.lang.String includingUniformPath,
java.lang.String includedName)
Returns the resolved uniform path and content of an included file.
|
protected IncludedTokens |
resolveIncludedTokens(java.lang.String includingUniformPath,
java.lang.String includedName)
Returns the included tokens for a given include name.
|
conditionIsTrue, decideRegionInclusion, processIfDirective
isIfDirective, isPragmaDirective, mergeExpansionIntoTokens, parseMacroContent, preprocess, preprocess, setUniformPath
public static final java.util.regex.Pattern INCLUDE_PATTERN
public CPreprocessor(IMacroProvider macroProvider)
public static void removePreprocessorTokens(java.util.List<ShallowEntity> entities)
protected void handleInclude(java.lang.String uniformPath, IToken token, java.util.List<IToken> result, int inclusionLimit, java.util.Set<java.lang.String> seenPaths)
handleInclude
in class MacroHandlingCPreprocessorBase
uniformPath
- the uniform path of the file with the include.protected IncludedTokens resolveIncludedTokens(java.lang.String includingUniformPath, java.lang.String includedName)
includingUniformPath
- the uniform path of the file that includes this. May be null if no
information is available.includedName
- the name of the file to be included.protected Pair<java.lang.String,java.lang.String> resolveIncludeContent(java.lang.String includingUniformPath, java.lang.String includedName)
includingUniformPath
- the uniform path of the file that includes this. May be null if no
information is available.includedName
- the name of the file to be included.