Skip to content
Snippets Groups Projects
Commit 456d418b authored by Roberto Raggi's avatar Roberto Raggi
Browse files

Introduced iterators for the c++ literals.

parent 38ad8782
No related branches found
No related tags found
No related merge requests found
......@@ -522,6 +522,24 @@ Control::IdentifierIterator Control::firstIdentifier() const
Control::IdentifierIterator Control::lastIdentifier() const
{ return d->identifiers.end(); }
Control::StringLiteralIterator Control::firstStringLiteral() const
{ return d->stringLiterals.begin(); }
Control::StringLiteralIterator Control::lastStringLiteral() const
{ return d->stringLiterals.end(); }
Control::NumericLiteralIterator Control::firstNumericLiteral() const
{ return d->numericLiterals.begin(); }
Control::NumericLiteralIterator Control::lastNumericLiteral() const
{ return d->numericLiterals.end(); }
Control::FileNameIterator Control::firstFileName() const
{ return d->fileNames.begin(); }
Control::FileNameIterator Control::lastFileName() const
{ return d->fileNames.end(); }
StringLiteral *Control::findOrInsertStringLiteral(const char *chars, unsigned size)
{ return d->stringLiterals.findOrInsertLiteral(chars, size); }
......
......@@ -150,11 +150,30 @@ public:
Identifier *findOrInsertIdentifier(const char *chars, unsigned size);
Identifier *findOrInsertIdentifier(const char *chars);
/*
LiteralTable<Identifier> identifiers;
LiteralTable<StringLiteral> stringLiterals;
LiteralTable<NumericLiteral> numericLiterals;
LiteralTable<StringLiteral> fileNames;
*/
typedef const Identifier *const *IdentifierIterator;
typedef const StringLiteral *const *StringLiteralIterator;
typedef const NumericLiteral *const *NumericLiteralIterator;
typedef const StringLiteral *const *FileNameIterator;
IdentifierIterator firstIdentifier() const;
IdentifierIterator lastIdentifier() const;
StringLiteralIterator firstStringLiteral() const;
StringLiteralIterator lastStringLiteral() const;
NumericLiteralIterator firstNumericLiteral() const;
NumericLiteralIterator lastNumericLiteral() const;
FileNameIterator firstFileName() const;
FileNameIterator lastFileName() const;
StringLiteral *findOrInsertStringLiteral(const char *chars, unsigned size);
StringLiteral *findOrInsertStringLiteral(const char *chars);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment