Store the actual arguments of the macro expansions.

This commit is contained in:
Roberto Raggi
2009-03-04 11:47:30 +01:00
parent 08d0b03e70
commit e253f39360
6 changed files with 133 additions and 29 deletions

View File

@@ -31,7 +31,7 @@
#define CPLUSPLUS_PP_CLIENT_H
#include <CPlusPlusForwardDeclarations.h>
#include <QtGlobal>
#include <QVector>
QT_BEGIN_NAMESPACE
class QByteArray;
@@ -42,6 +42,23 @@ namespace CPlusPlus {
class Macro;
class CPLUSPLUS_EXPORT MacroArgumentReference
{
unsigned _position;
unsigned _length;
public:
MacroArgumentReference(unsigned position = 0, unsigned length = 0)
: _position(position), _length(length)
{ }
unsigned position() const
{ return _position; }
unsigned length() const
{ return _length; }
};
class CPLUSPLUS_EXPORT Client
{
Client(const Client &other);
@@ -63,7 +80,9 @@ public:
virtual void startExpandingMacro(unsigned offset,
const Macro &macro,
const QByteArray &originalTextt) = 0;
const QByteArray &originalText,
const QVector<MacroArgumentReference> &actuals
= QVector<MacroArgumentReference>()) = 0;
virtual void stopExpandingMacro(unsigned offset,
const Macro &macro) = 0;