Commit 538901d4 authored by hjk's avatar hjk Committed by hjk
Browse files

preprocessor: make Preprocessor::preprocess private



Change-Id: Ic81e3ebec1b42ae0698a340ee7e1c711225c1162
Reviewed-by: default avatarhjk <qthjk@ovi.com>
parent 64565e79
...@@ -82,10 +82,6 @@ public: ...@@ -82,10 +82,6 @@ public:
QByteArray operator()(const QString &filename, const QString &source); QByteArray operator()(const QString &filename, const QString &source);
QByteArray operator()(const QString &filename, const QByteArray &source, bool noLines = false, bool markGeneratedTokens = true); QByteArray operator()(const QString &filename, const QByteArray &source, bool noLines = false, bool markGeneratedTokens = true);
void preprocess(const QString &filename,
const QByteArray &source,
QByteArray *result, bool noLines, bool markGeneratedTokens, bool inCondition);
bool expandMacros() const; bool expandMacros() const;
void setExpandMacros(bool expandMacros); void setExpandMacros(bool expandMacros);
...@@ -93,6 +89,10 @@ public: ...@@ -93,6 +89,10 @@ public:
void setKeepComments(bool keepComments); void setKeepComments(bool keepComments);
private: private:
void preprocess(const QString &filename,
const QByteArray &source,
QByteArray *result, bool noLines, bool markGeneratedTokens, bool inCondition);
enum { MAX_LEVEL = 512 }; enum { MAX_LEVEL = 512 };
struct State { struct State {
......
...@@ -204,8 +204,7 @@ public: ...@@ -204,8 +204,7 @@ public:
{ {
QByteArray src = loadSource(fileName); QByteArray src = loadSource(fileName);
QVERIFY(!src.isEmpty()); QVERIFY(!src.isEmpty());
*m_output = m_pp(fileName, src, nolines, true);
m_pp.preprocess(fileName, src, m_output, nolines, true, false);
} }
QList<Block> skippedBlocks() const QList<Block> skippedBlocks() const
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment