![]() |
Qt
Internal/Contributor docs for the Qt SDK. Note: These are NOT official API docs; those are found at https://doc.qt.io/
|
#include <preprocessor.h>
Public Types | |
| enum | TokenizeMode { TokenizeCpp , TokenizePreprocessor , PreparePreprocessorStatement , TokenizePreprocessorStatement , TokenizeInclude , PrepareDefine , TokenizeDefine } |
Static Public Member Functions | |
| static Symbols | macroExpandIdentifier (Preprocessor *that, SymbolStack &symbols, int lineNum, QByteArray *macroName) |
| static void | macroExpand (Symbols *into, Preprocessor *that, const Symbols &toExpand, qsizetype &index, int lineNum, bool one, const QSet< QByteArray > &excludeSymbols=QSet< QByteArray >()) |
| static Symbols | tokenize (const QByteArray &input, int lineNum=1, TokenizeMode mode=TokenizeCpp) |
Public Attributes | |
| QList< QByteArray > | frameworks |
| QSet< QByteArray > | preprocessedIncludes |
| QHash< QByteArray, QByteArray > | nonlocalIncludePathResolutionCache |
| Macros | macros |
| Public Attributes inherited from Parser | |
| Symbols | symbols |
| qsizetype | index = 0 |
| bool | displayWarnings = true |
| bool | displayNotes = true |
| bool | activeQtMode = false |
| bool | qmlMacroWarningIsFatal = false |
| QList< IncludePath > | includes |
| std::stack< QByteArray, QByteArrayList > | currentFilenames |
| QList< Function > | m_functions |
| QList< Point > | m_points |
| QList< Replace > | m_replaces |
| QList< QString > | m_prefixes |
| QList< QString > | m_metadata |
| QList< LineNumber > | m_offsets |
| QList< QString > | m_includeDirs |
| QString | m_provider |
Static Public Attributes | |
| static bool | preprocessOnly = false |
Definition at line 28 of file preprocessor.h.
| Enumerator | |
|---|---|
| TokenizeCpp | |
| TokenizePreprocessor | |
| PreparePreprocessorStatement | |
| TokenizePreprocessorStatement | |
| TokenizeInclude | |
| PrepareDefine | |
| TokenizeDefine | |
Definition at line 53 of file preprocessor.h.
|
inline |
Definition at line 31 of file preprocessor.h.
| int Preprocessor::evaluateCondition | ( | ) |
Definition at line 989 of file preprocessor.cpp.
References substituteUntilNewline(), and PP_Expression::value().
|
static |
Definition at line 509 of file preprocessor.cpp.
References SymbolStack::hasNext(), Symbol::lineNum, SymbolStack::next(), and SymbolStack::symbol().
|
static |
Definition at line 551 of file preprocessor.cpp.
References Symbol::Symbol(), SymbolStack::hasNext(), Macro::isFunction, Macro::isVariadic, macros, SymbolStack::next(), SymbolStack::symbol(), SymbolStack::test(), and Symbol::token.
Definition at line 1350 of file preprocessor.cpp.
References Macro::isVariadic.
| Symbols Preprocessor::preprocessed | ( | const QByteArray & | filename, |
| QFile * | device ) |
Definition at line 1308 of file preprocessor.cpp.
| QByteArray Preprocessor::resolveInclude | ( | const QByteArray & | filename, |
| const QByteArray & | relativeTo ) |
Definition at line 1124 of file preprocessor.cpp.
| void Preprocessor::setDebugIncludes | ( | bool | value | ) |
Definition at line 1404 of file preprocessor.cpp.
| bool Preprocessor::skipBranch | ( | ) |
Definition at line 106 of file preprocessor.cpp.
References skipUntilEndif().
| void Preprocessor::skipUntilEndif | ( | ) |
Definition at line 89 of file preprocessor.cpp.
References skipUntilEndif().
Referenced by skipBranch(), and skipUntilEndif().
Definition at line 702 of file preprocessor.cpp.
References macros, and Symbol::token.
Referenced by evaluateCondition().
|
static |
Definition at line 129 of file preprocessor.cpp.
References Symbol::Symbol(), Symbol::Symbol(), defchar, defnext, ident, is_ident_char(), keyword_trans, next, pp_keyword_trans, PrepareDefine, PreparePreprocessorStatement, preprocessOnly, skipQuote(), token, TokenizeCpp, TokenizeDefine, TokenizeInclude, TokenizePreprocessor, and TokenizePreprocessorStatement.
| QList<QByteArray> Preprocessor::frameworks |
Definition at line 33 of file preprocessor.h.
| Macros Preprocessor::macros |
Definition at line 36 of file preprocessor.h.
Referenced by macroExpandIdentifier(), runMoc(), and substituteUntilNewline().
| QHash<QByteArray, QByteArray> Preprocessor::nonlocalIncludePathResolutionCache |
Definition at line 35 of file preprocessor.h.
| QSet<QByteArray> Preprocessor::preprocessedIncludes |
Definition at line 34 of file preprocessor.h.
|
static |
Definition at line 32 of file preprocessor.h.
Referenced by runMoc(), and tokenize().