Refactored a bit the preprocessor so we can use it to generate file dependencies.

This commit is contained in:
Roberto Raggi
2009-05-13 15:28:11 +02:00
parent 98776099d3
commit caad98ec4c
2 changed files with 44 additions and 22 deletions

View File

@@ -70,6 +70,10 @@ public:
QByteArray operator()(const QByteArray &filename,
const QByteArray &source);
void preprocess(const QByteArray &filename,
const QByteArray &source,
QByteArray *result);
private:
enum { MAX_LEVEL = 512 };
@@ -99,10 +103,6 @@ private:
bool markGeneratedTokens(bool markGeneratedTokens, TokenIterator dot = 0);
void preprocess(const QByteArray &filename,
const QByteArray &source,
QByteArray *result);
QByteArray expand(const QByteArray &source);
void expand(const QByteArray &source, QByteArray *result);
void expand(const char *first, const char *last, QByteArray *result);
@@ -165,6 +165,10 @@ private:
State createStateFromSource(const QByteArray &source) const;
void out(const QByteArray &text);
void out(char ch);
void out(const char *s);
private:
Client *client;
Environment *env;