|
Cogs.Core
|
Partial C preprocessor. More...
#include <Preprocessor.h>
Public Member Functions | |
| bool | process (Context *context, const StringView input) |
| Run a text block through the preprocessor. | |
Public Attributes | |
| std::string | processed |
| Resulting processed text. | |
| std::unordered_set< StringRef > | identifiersSeen |
| Set of identifiers encountered in active text. | |
| std::unordered_map< StringRef, StringRef > | definitions |
| Set of preprocessor defines encountered in active text. | |
Partial C preprocessor.
This preprocessor does:
It does not:
Definition at line 41 of file Preprocessor.h.
| bool Cogs::Core::PartialPreprocessor::process | ( | Context * | context, |
| const StringView | input | ||
| ) |
Run a text block through the preprocessor.
Can be invoked multiple times, to incrementally populate processed, identifiersSeen and definitions
Definition at line 833 of file Preprocessor.cpp.
Set of preprocessor defines encountered in active text.
Definition at line 54 of file Preprocessor.h.
| std::unordered_set<StringRef> Cogs::Core::PartialPreprocessor::identifiersSeen |
Set of identifiers encountered in active text.
Definition at line 51 of file Preprocessor.h.
| std::string Cogs::Core::PartialPreprocessor::processed |
Resulting processed text.
The preprocessor doesn't use this except for outputing, so it is safe to steal the contents between invocations of process.
Definition at line 48 of file Preprocessor.h.