Class CPreprocessor#
Defined in File preproc.h
Nested Relationships#
Nested Types#
Inheritance Relationships#
Derived Type#
public CParser
(Class CParser)
Class Documentation#
-
class CPreprocessor#
Preprocessing class.
Subclassed by CParser
Public Functions
-
CToken ProcessPreproc(CCodePos &rCode, const CContextPtr &rptrContext)#
Process preprocessor line.
- Parameters:
rCode – [in] Reference to the code holding the line the might contain a preprocessor direction.
rptrContext – [in] Reference to the smart pointer to the source code context.
- Returns:
Returns a meta token if one is available; an empty token otherwise.
-
void FinalProcessing(const CCodePos &rCode)#
Checks whether currently a conditional section is being processed. If so, this function will trigger an exception for a missing
#endif'
directive.- Parameters:
rCode – [in] Reference to the code holding the line the might contain a preprocessor direction.
-
bool CurrentSectionEnabled() const#
Processing enabled. Part of conditional inclusion.
Remark
If processing is disabled, lines should be skipped. Preprocessor directives should be processed anyway.
- Returns:
Returns whether to process current code.
-
virtual void IncludeFile(const std::filesystem::path &rpath, bool bLocal) = 0#
Include a file. Function prototype to be implemented by the parser.
- Parameters:
rpath – [in] Reference to the source file path. Must be a valid path.
bLocal – [in] When set, the include file is a local include. Otherwise it represents a global include.
-
virtual CIdlCompilerEnvironment &GetEnvironment() = 0#
Get the environment. Function prototype to be implemented by the parser.
- Returns:
Reference to the environment.
-
CToken ProcessPreproc(CCodePos &rCode, const CContextPtr &rptrContext)#