Enhance data stored for macros and macro uses.

In preparation for finding macro uses.

* Macro: add offset and length
* MacroUse: add line
* Document: add convenience functions for finding a macro definition, use
  or undefined use at a given location.

Reviewed-by: Erik Verbruggen
This commit is contained in:
Christian Kamm
2009-12-21 14:47:22 +01:00
parent 6c27faf0fc
commit c3cc7cf4d8
7 changed files with 72 additions and 17 deletions

View File

@@ -92,6 +92,18 @@ public:
void setLine(unsigned line)
{ _line = line; }
unsigned offset() const
{ return _offset; }
void setOffset(unsigned offset)
{ _offset = offset; }
unsigned length() const
{ return _length; }
void setLength(unsigned length)
{ _length = length; }
bool isHidden() const
{ return f._hidden; }
@@ -129,6 +141,8 @@ private:
QVector<QByteArray> _formals;
QString _fileName;
unsigned _line;
unsigned _offset;
unsigned _length;
union
{