C++: Store comment tokens in the translation unit.

Change-Id: I904123bdbbd675e9f018236c1fed13528d83f87f
Reviewed-on: http://codereview.qt.nokia.com/3481
Reviewed-by: Roberto Raggi <roberto.raggi@nokia.com>
This commit is contained in:
Christian Kamm
2011-08-24 09:05:19 +02:00
parent 93e367ed0c
commit 142bce94fb
2 changed files with 18 additions and 0 deletions

View File

@@ -57,6 +57,9 @@ public:
int tokenKind(unsigned index) const;
const char *spell(unsigned index) const;
unsigned commentCount() const;
const Token &commentAt(unsigned index) const;
unsigned matchingBrace(unsigned index) const;
const Identifier *identifier(unsigned index) const;
const Literal *literal(unsigned index) const;
@@ -164,6 +167,7 @@ private:
const char *_firstSourceChar;
const char *_lastSourceChar;
std::vector<Token> *_tokens;
std::vector<Token> *_comments;
std::vector<unsigned> _lineOffsets;
std::vector<PPLine> _ppLines;
MemoryPool *_pool;