diff options
| author | Thiago Macieira <[email protected]> | 2009-07-27 21:47:03 +0200 |
|---|---|---|
| committer | Thiago Macieira <[email protected]> | 2009-08-03 14:59:42 +0200 |
| commit | d0457b70e33f1a090a91b0037e9254a0e14b8427 (patch) | |
| tree | 2984b2db2129ba8cfefeac46d246a4a335b92150 /src/libs/cplusplus/pp-engine.cpp | |
| parent | 88549a4b1dbbb16c7d63f176fd870ec8bdb61477 (diff) | |
Compile the C++ parser library with Sun CC 5.9.
Things you mustn't do:
1) end an enum with a comma
2) #include <cxxxx> and not use std::
3) use anonymous structures
All three things are invalid C++. Anonymous structures inside
anonymous unions are allowed by GCC, but that doesn't mean it's valid.
Diffstat (limited to 'src/libs/cplusplus/pp-engine.cpp')
| -rw-r--r-- | src/libs/cplusplus/pp-engine.cpp | 22 |
1 files changed, 11 insertions, 11 deletions
diff --git a/src/libs/cplusplus/pp-engine.cpp b/src/libs/cplusplus/pp-engine.cpp index 35ddf3ace82..ec169c3d942 100644 --- a/src/libs/cplusplus/pp-engine.cpp +++ b/src/libs/cplusplus/pp-engine.cpp @@ -64,7 +64,7 @@ struct Value { enum Kind { Kind_Long, - Kind_ULong, + Kind_ULong }; Kind kind; @@ -231,7 +231,7 @@ protected: QByteArray tokenSpell() const { const QByteArray text = QByteArray::fromRawData(source.constData() + (*_lex)->offset, - (*_lex)->length); + (*_lex)->f.length); return text; } @@ -677,7 +677,7 @@ void Preprocessor::processSkippingBlocks(bool skippingBlocks, unsigned offset = start->offset; if (_skipping[iflevel]) { - if (_dot->newline) + if (_dot->f.newline) ++offset; client->startSkippingBlocks(offset); @@ -751,7 +751,7 @@ void Preprocessor::preprocess(const QString &fileName, const QByteArray &source, while (true) { - if (_dot->joined) + if (_dot->f.joined) out("\\"); processNewline(); @@ -759,13 +759,13 @@ void Preprocessor::preprocess(const QString &fileName, const QByteArray &source, if (_dot->is(T_EOF_SYMBOL)) { break; - } else if (_dot->is(T_POUND) && (! _dot->joined && _dot->newline)) { + } else if (_dot->is(T_POUND) && (! _dot->f.joined && _dot->f.newline)) { // handle the preprocessor directive TokenIterator start = _dot; do { ++_dot; - } while (_dot->isNot(T_EOF_SYMBOL) && (_dot->joined || ! _dot->newline)); + } while (_dot->isNot(T_EOF_SYMBOL) && (_dot->f.joined || ! _dot->f.newline)); const bool skippingBlocks = _skipping[iflevel]; @@ -777,11 +777,11 @@ void Preprocessor::preprocess(const QString &fileName, const QByteArray &source, do { ++_dot; - } while (_dot->isNot(T_EOF_SYMBOL) && (_dot->joined || ! _dot->newline)); + } while (_dot->isNot(T_EOF_SYMBOL) && (_dot->f.joined || ! _dot->f.newline)); } else { - if (_dot->whitespace) { + if (_dot->f.whitespace) { unsigned endOfPreviousToken = 0; if (_dot != _tokens.constBegin()) @@ -1027,14 +1027,14 @@ const char *Preprocessor::endOfToken(const Token &token) const QByteArray Preprocessor::tokenSpell(const Token &token) const { const QByteArray text = QByteArray::fromRawData(_source.constBegin() + token.offset, - token.length); + token.f.length); return text; } QByteArray Preprocessor::tokenText(const Token &token) const { const QByteArray text(_source.constBegin() + token.offset, - token.length); + token.f.length); return text; } @@ -1179,7 +1179,7 @@ void Preprocessor::processDefine(TokenIterator firstToken, TokenIterator lastTok macro.setName(tokenText(*tk)); ++tk; // skip T_IDENTIFIER - if (tk->is(T_LPAREN) && ! tk->whitespace) { + if (tk->is(T_LPAREN) && ! tk->f.whitespace) { // a function-like macro definition macro.setFunctionLike(true); |
