forked from qt-creator/qt-creator
Put the preprocessor the CPlusPlus namespace
This commit is contained in:
@@ -107,7 +107,7 @@ static const char pp_configuration[] =
|
||||
namespace CppTools {
|
||||
namespace Internal {
|
||||
|
||||
class CppPreprocessor: public rpp::Client
|
||||
class CppPreprocessor: public CPlusPlus::Client
|
||||
{
|
||||
public:
|
||||
CppPreprocessor(QPointer<CppModelManager> modelManager);
|
||||
@@ -132,9 +132,9 @@ protected:
|
||||
virtual void macroAdded(const QByteArray ¯oName,
|
||||
const QByteArray ¯oText);
|
||||
virtual void startExpandingMacro(unsigned offset,
|
||||
const rpp::Macro ¯o,
|
||||
const Macro ¯o,
|
||||
const QByteArray &originalText);
|
||||
virtual void stopExpandingMacro(unsigned offset, const rpp::Macro ¯o);
|
||||
virtual void stopExpandingMacro(unsigned offset, const Macro ¯o);
|
||||
virtual void startSkippingBlocks(unsigned offset);
|
||||
virtual void stopSkippingBlocks(unsigned offset);
|
||||
virtual void sourceNeeded(QString &fileName, IncludeType type);
|
||||
@@ -142,8 +142,8 @@ protected:
|
||||
private:
|
||||
QPointer<CppModelManager> m_modelManager;
|
||||
CppModelManager::DocumentTable m_documents;
|
||||
rpp::Environment env;
|
||||
rpp::pp m_proc;
|
||||
Environment env;
|
||||
pp m_proc;
|
||||
QStringList m_includePaths;
|
||||
QStringList m_systemIncludePaths;
|
||||
QMap<QString, QByteArray> m_workingCopy;
|
||||
@@ -304,7 +304,7 @@ void CppPreprocessor::macroAdded(const QByteArray ¯oName, const QByteArray &
|
||||
}
|
||||
|
||||
void CppPreprocessor::startExpandingMacro(unsigned offset,
|
||||
const rpp::Macro &,
|
||||
const Macro &,
|
||||
const QByteArray &originalText)
|
||||
{
|
||||
if (! m_currentDoc)
|
||||
@@ -314,7 +314,7 @@ void CppPreprocessor::startExpandingMacro(unsigned offset,
|
||||
m_currentDoc->addMacroUse(offset, originalText.length());
|
||||
}
|
||||
|
||||
void CppPreprocessor::stopExpandingMacro(unsigned, const rpp::Macro &)
|
||||
void CppPreprocessor::stopExpandingMacro(unsigned, const Macro &)
|
||||
{
|
||||
if (! m_currentDoc)
|
||||
return;
|
||||
|
||||
@@ -55,7 +55,7 @@
|
||||
|
||||
#include <cctype>
|
||||
|
||||
namespace rpp {
|
||||
namespace CPlusPlus {
|
||||
|
||||
inline bool pp_isalpha (int __ch)
|
||||
{ return std::isalpha ((unsigned char) __ch) != 0; }
|
||||
@@ -69,6 +69,6 @@ inline bool pp_isdigit (int __ch)
|
||||
inline bool pp_isspace (int __ch)
|
||||
{ return std::isspace ((unsigned char) __ch) != 0; }
|
||||
|
||||
} // namespace rpp
|
||||
} // namespace CPlusPlus
|
||||
|
||||
#endif // PP_CCTYPE_H
|
||||
|
||||
@@ -38,7 +38,7 @@
|
||||
#include <QString>
|
||||
#include <QFile>
|
||||
|
||||
namespace rpp {
|
||||
namespace CPlusPlus {
|
||||
|
||||
class Macro;
|
||||
|
||||
@@ -74,6 +74,6 @@ public:
|
||||
virtual void stopSkippingBlocks(unsigned offset) = 0;
|
||||
};
|
||||
|
||||
} // namespace rpp
|
||||
} // namespace CPlusPlus
|
||||
|
||||
#endif // PP_CLIENT_H
|
||||
|
||||
@@ -57,7 +57,6 @@
|
||||
#include <QtDebug>
|
||||
#include <algorithm>
|
||||
|
||||
using namespace rpp;
|
||||
using namespace CPlusPlus;
|
||||
|
||||
namespace {
|
||||
|
||||
@@ -62,7 +62,7 @@ namespace CPlusPlus {
|
||||
class Token;
|
||||
}
|
||||
|
||||
namespace rpp {
|
||||
namespace CPlusPlus {
|
||||
|
||||
struct Value
|
||||
{
|
||||
@@ -200,7 +200,7 @@ namespace rpp {
|
||||
|
||||
Value evalExpression(TokenIterator firstToken,
|
||||
TokenIterator lastToken,
|
||||
const QByteArray &source) const;
|
||||
const QByteArray &source) const;
|
||||
|
||||
QVector<CPlusPlus::Token> tokenize(const QByteArray &text) const;
|
||||
|
||||
@@ -226,6 +226,6 @@ namespace rpp {
|
||||
bool isQtReservedWord(const QByteArray &name) const;
|
||||
};
|
||||
|
||||
} // namespace rpp
|
||||
} // namespace CPlusPlus
|
||||
|
||||
#endif // PP_ENGINE_H
|
||||
|
||||
@@ -54,7 +54,7 @@
|
||||
#include "pp.h"
|
||||
#include <cstring>
|
||||
|
||||
using namespace rpp;
|
||||
using namespace CPlusPlus;
|
||||
|
||||
Environment::Environment ()
|
||||
: currentLine(0),
|
||||
|
||||
@@ -56,7 +56,7 @@
|
||||
#include <QVector>
|
||||
#include <QByteArray>
|
||||
|
||||
namespace rpp {
|
||||
namespace CPlusPlus {
|
||||
|
||||
struct Macro;
|
||||
|
||||
@@ -104,6 +104,6 @@ private:
|
||||
int _hash_count;
|
||||
};
|
||||
|
||||
} // namespace rpp
|
||||
} // namespace CPlusPlus
|
||||
|
||||
#endif // PP_ENVIRONMENT_H
|
||||
|
||||
@@ -55,7 +55,7 @@
|
||||
|
||||
#include <QByteArray>
|
||||
|
||||
namespace rpp {
|
||||
namespace CPlusPlus {
|
||||
namespace _PP_internal {
|
||||
|
||||
inline bool comment_p (const char *__first, const char *__last)
|
||||
@@ -73,6 +73,6 @@ inline bool comment_p (const char *__first, const char *__last)
|
||||
}
|
||||
|
||||
} // _PP_internal
|
||||
} // namespace rpp
|
||||
} // namespace CPlusPlus
|
||||
|
||||
#endif // PP_INTERNAL_H
|
||||
|
||||
@@ -35,7 +35,7 @@
|
||||
#include "pp-macro-expander.h"
|
||||
#include <QDateTime>
|
||||
|
||||
using namespace rpp;
|
||||
using namespace CPlusPlus;
|
||||
|
||||
MacroExpander::MacroExpander (Environment &env, pp_frame *frame)
|
||||
: env(env), frame(frame),
|
||||
|
||||
@@ -53,7 +53,7 @@
|
||||
#ifndef PP_MACRO_EXPANDER_H
|
||||
#define PP_MACRO_EXPANDER_H
|
||||
|
||||
namespace rpp {
|
||||
namespace CPlusPlus {
|
||||
|
||||
struct pp_frame
|
||||
{
|
||||
@@ -97,7 +97,7 @@ namespace rpp {
|
||||
int generated_lines;
|
||||
};
|
||||
|
||||
} // namespace rpp
|
||||
} // namespace CPlusPlus
|
||||
|
||||
#endif // PP_MACRO_EXPANDER_H
|
||||
|
||||
|
||||
@@ -56,7 +56,7 @@
|
||||
#include <QByteArray>
|
||||
#include <QVector>
|
||||
|
||||
namespace rpp {
|
||||
namespace CPlusPlus {
|
||||
|
||||
struct Macro
|
||||
{
|
||||
@@ -90,6 +90,6 @@ namespace rpp {
|
||||
{ }
|
||||
};
|
||||
|
||||
} // namespace rpp
|
||||
} // namespace CPlusPlus
|
||||
|
||||
#endif // PP_MACRO_H
|
||||
|
||||
@@ -53,7 +53,7 @@
|
||||
#ifndef PP_SCANNER_H
|
||||
#define PP_SCANNER_H
|
||||
|
||||
namespace rpp {
|
||||
namespace CPlusPlus {
|
||||
|
||||
struct pp_skip_blanks
|
||||
{
|
||||
@@ -373,7 +373,7 @@ struct pp_skip_argument
|
||||
}
|
||||
};
|
||||
|
||||
} // namespace rpp
|
||||
} // namespace CPlusPlus
|
||||
|
||||
#endif // PP_SCANNER_H
|
||||
|
||||
|
||||
Reference in New Issue
Block a user