PreprocessorToken Class Reference
#include <PreprocessorToken>
Public Variables
Related Non-Members
- QList<PreprocessorToken> preprocess ( const char * document, const QList<LexerToken> & _tokens )
Detailed Description
Member Variable Documentation
const char * PreprocessorToken::cStr
unsigned int PreprocessorToken::cStrLen
int PreprocessorToken::line
int PreprocessorToken::offset
Token PreprocessorToken::token
Related Non-Members
QList<PreprocessorToken> preprocess ( const char * document, const QList<LexerToken> & _tokens )
Returns a list of preprocessor tokens in document. The _tokens value must the list of tokens as returned by tokenize().
The logic used the preprocessing works like this.
Enter/Leave string when <QUOTE>. Everything is preserved within a string. When not in string:
- Remove all tokens between <HASH> and <NEWLINE>
- Simplify <WHITESPACE> such that it is replaced with a <SINGLE_SPACE> except around NEWLINE's
- Replace all <CHARACTER>[<DIGIT>|<CHARACTER>]* with <NAME>
- Remove multiple <NEWLINE>s
- Remove all <BACKSLASH><WHITESPACE>*[<NEWLINE>]
Copyright © 2009 Nokia |
Qt Extended - QBuild Maintainer Guide |