diff options
author | Roberto Raggi <roberto.raggi@nokia.com> | 2009-05-14 09:43:12 (GMT) |
---|---|---|
committer | Roberto Raggi <roberto.raggi@nokia.com> | 2009-05-14 09:43:12 (GMT) |
commit | 699e4ebfca621d4a009221b4304c3773cb783f7b (patch) | |
tree | d9bdf16281f2dd79c0c1dcc7e5c1c361e417cc0c /src/declarative/qml/parser | |
parent | 96bf1dee730651afa4f763fd5d7d52e49921d214 (diff) | |
download | Qt-699e4ebfca621d4a009221b4304c3773cb783f7b.zip Qt-699e4ebfca621d4a009221b4304c3773cb783f7b.tar.gz Qt-699e4ebfca621d4a009221b4304c3773cb783f7b.tar.bz2 |
Renamed JavaScriptEnginePrivate in Engine.
Diffstat (limited to 'src/declarative/qml/parser')
-rw-r--r-- | src/declarative/qml/parser/javascript.g | 8 | ||||
-rw-r--r-- | src/declarative/qml/parser/javascriptengine_p.cpp | 2 | ||||
-rw-r--r-- | src/declarative/qml/parser/javascriptengine_p.h | 4 | ||||
-rw-r--r-- | src/declarative/qml/parser/javascriptlexer.cpp | 2 | ||||
-rw-r--r-- | src/declarative/qml/parser/javascriptlexer_p.h | 6 | ||||
-rw-r--r-- | src/declarative/qml/parser/javascriptnodepool_p.h | 8 | ||||
-rw-r--r-- | src/declarative/qml/parser/javascriptparser.cpp | 4 | ||||
-rw-r--r-- | src/declarative/qml/parser/javascriptparser_p.h | 4 | ||||
-rw-r--r-- | src/declarative/qml/parser/javascriptprettypretty.cpp | 30 |
9 files changed, 34 insertions, 34 deletions
diff --git a/src/declarative/qml/parser/javascript.g b/src/declarative/qml/parser/javascript.g index b70774b..53d10b6 100644 --- a/src/declarative/qml/parser/javascript.g +++ b/src/declarative/qml/parser/javascript.g @@ -215,7 +215,7 @@ class QString; namespace JavaScript { -class JavaScriptEnginePrivate; +class Engine; class NameId; class Parser: protected $table @@ -287,7 +287,7 @@ public: Parser(); ~Parser(); - bool parse(JavaScriptEnginePrivate *driver); + bool parse(Engine *driver); AST::UiProgram *ast() { return program; } @@ -383,7 +383,7 @@ void Parser::reallocateStack() location_stack = reinterpret_cast<AST::SourceLocation*> (qRealloc(location_stack, stack_size * sizeof(AST::SourceLocation))); } -inline static bool automatic(JavaScriptEnginePrivate *driver, int token) +inline static bool automatic(Engine *driver, int token) { return token == $table::T_RBRACE || token == 0 @@ -421,7 +421,7 @@ static inline AST::SourceLocation location(Lexer *lexer) return loc; } -bool Parser::parse(JavaScriptEnginePrivate *driver) +bool Parser::parse(Engine *driver) { Lexer *lexer = driver->lexer(); bool hadErrors = false; diff --git a/src/declarative/qml/parser/javascriptengine_p.cpp b/src/declarative/qml/parser/javascriptengine_p.cpp index ab1e370..679202c 100644 --- a/src/declarative/qml/parser/javascriptengine_p.cpp +++ b/src/declarative/qml/parser/javascriptengine_p.cpp @@ -69,7 +69,7 @@ QString Ecma::RegExp::flagsToString(int flags) return result; } -NodePool::NodePool(const QString &fileName, JavaScriptEnginePrivate *engine) +NodePool::NodePool(const QString &fileName, Engine *engine) : m_fileName(fileName), m_engine(engine) { } diff --git a/src/declarative/qml/parser/javascriptengine_p.h b/src/declarative/qml/parser/javascriptengine_p.h index b768f5e..6aa4a76 100644 --- a/src/declarative/qml/parser/javascriptengine_p.h +++ b/src/declarative/qml/parser/javascriptengine_p.h @@ -92,7 +92,7 @@ public: { return _text < other._text; } }; -class JavaScriptEnginePrivate +class Engine { Lexer *_lexer; NodePool *_nodePool; @@ -100,7 +100,7 @@ class JavaScriptEnginePrivate QSet<NameId> _literals; public: - JavaScriptEnginePrivate() + Engine() : _lexer(0), _nodePool(0), _ast(0) { } diff --git a/src/declarative/qml/parser/javascriptlexer.cpp b/src/declarative/qml/parser/javascriptlexer.cpp index dbb7351..a0081c7 100644 --- a/src/declarative/qml/parser/javascriptlexer.cpp +++ b/src/declarative/qml/parser/javascriptlexer.cpp @@ -76,7 +76,7 @@ namespace JavaScript { extern double integerFromString(const char *buf, int size, int radix); } -JavaScript::Lexer::Lexer(JavaScriptEnginePrivate *eng) +JavaScript::Lexer::Lexer(Engine *eng) : driver(eng), yylineno(0), done(false), diff --git a/src/declarative/qml/parser/javascriptlexer_p.h b/src/declarative/qml/parser/javascriptlexer_p.h index 55351c4..092609c 100644 --- a/src/declarative/qml/parser/javascriptlexer_p.h +++ b/src/declarative/qml/parser/javascriptlexer_p.h @@ -61,13 +61,13 @@ QT_BEGIN_NAMESPACE namespace JavaScript { -class JavaScriptEnginePrivate; +class Engine; class NameId; class Lexer { public: - Lexer(JavaScriptEnginePrivate *eng); + Lexer(Engine *eng); ~Lexer(); void setCode(const QString &c, int lineno); @@ -155,7 +155,7 @@ public: { err = NoError; } private: - JavaScriptEnginePrivate *driver; + Engine *driver; int yylineno; bool done; char *buffer8; diff --git a/src/declarative/qml/parser/javascriptnodepool_p.h b/src/declarative/qml/parser/javascriptnodepool_p.h index 91b9132..cb56fbb 100644 --- a/src/declarative/qml/parser/javascriptnodepool_p.h +++ b/src/declarative/qml/parser/javascriptnodepool_p.h @@ -68,7 +68,7 @@ class Node; class Code; class CompilationUnit; -class JavaScriptEnginePrivate; +class Engine; template <typename NodeType> inline NodeType *makeAstNode(MemoryPool *storage) @@ -108,13 +108,13 @@ inline NodeType *makeAstNode(MemoryPool *storage, Arg1 arg1, Arg2 arg2, Arg3 arg class NodePool : public MemoryPool { public: - NodePool(const QString &fileName, JavaScriptEnginePrivate *engine); + NodePool(const QString &fileName, Engine *engine); virtual ~NodePool(); Code *createCompiledCode(AST::Node *node, CompilationUnit &compilation); inline QString fileName() const { return m_fileName; } - inline JavaScriptEnginePrivate *engine() const { return m_engine; } + inline Engine *engine() const { return m_engine; } #ifndef J_SCRIPT_NO_EVENT_NOTIFY inline qint64 id() const { return m_id; } #endif @@ -122,7 +122,7 @@ public: private: QHash<AST::Node*, Code*> m_codeCache; QString m_fileName; - JavaScriptEnginePrivate *m_engine; + Engine *m_engine; #ifndef J_SCRIPT_NO_EVENT_NOTIFY qint64 m_id; #endif diff --git a/src/declarative/qml/parser/javascriptparser.cpp b/src/declarative/qml/parser/javascriptparser.cpp index 39e7aba..3c853cb 100644 --- a/src/declarative/qml/parser/javascriptparser.cpp +++ b/src/declarative/qml/parser/javascriptparser.cpp @@ -75,7 +75,7 @@ void Parser::reallocateStack() location_stack = reinterpret_cast<AST::SourceLocation*> (qRealloc(location_stack, stack_size * sizeof(AST::SourceLocation))); } -inline static bool automatic(JavaScriptEnginePrivate *driver, int token) +inline static bool automatic(Engine *driver, int token) { return token == JavaScriptGrammar::T_RBRACE || token == 0 @@ -113,7 +113,7 @@ static inline AST::SourceLocation location(Lexer *lexer) return loc; } -bool Parser::parse(JavaScriptEnginePrivate *driver) +bool Parser::parse(Engine *driver) { Lexer *lexer = driver->lexer(); bool hadErrors = false; diff --git a/src/declarative/qml/parser/javascriptparser_p.h b/src/declarative/qml/parser/javascriptparser_p.h index e3e08cb..deb6176 100644 --- a/src/declarative/qml/parser/javascriptparser_p.h +++ b/src/declarative/qml/parser/javascriptparser_p.h @@ -70,7 +70,7 @@ class QString; namespace JavaScript { -class JavaScriptEnginePrivate; +class Engine; class NameId; class Parser: protected JavaScriptGrammar @@ -142,7 +142,7 @@ public: Parser(); ~Parser(); - bool parse(JavaScriptEnginePrivate *driver); + bool parse(Engine *driver); AST::UiProgram *ast() { return program; } diff --git a/src/declarative/qml/parser/javascriptprettypretty.cpp b/src/declarative/qml/parser/javascriptprettypretty.cpp index 9685de5..0342b39 100644 --- a/src/declarative/qml/parser/javascriptprettypretty.cpp +++ b/src/declarative/qml/parser/javascriptprettypretty.cpp @@ -182,7 +182,7 @@ void PrettyPretty::endVisit(AST::ThisExpression *node) bool PrettyPretty::visit(AST::IdentifierExpression *node) { - out << JavaScriptEnginePrivate::toString(node->name); + out << Engine::toString(node->name); return true; } @@ -229,7 +229,7 @@ void PrettyPretty::endVisit(AST::FalseLiteral *node) bool PrettyPretty::visit(AST::StringLiteral *node) { - QString lit = JavaScriptEnginePrivate::toString(node->value); + QString lit = Engine::toString(node->value); lit.replace(QLatin1String("\\"), QLatin1String("\\\\")); out << "\"" << lit << "\""; return false; @@ -253,7 +253,7 @@ void PrettyPretty::endVisit(AST::NumericLiteral *node) bool PrettyPretty::visit(AST::RegExpLiteral *node) { - out << "/" << JavaScriptEnginePrivate::toString(node->pattern) << "/"; + out << "/" << Engine::toString(node->pattern) << "/"; if (node->flags) out << JavaScript::Ecma::RegExp::flagsToString(node->flags); @@ -348,7 +348,7 @@ void PrettyPretty::endVisit(AST::PropertyNameAndValueList *node) bool PrettyPretty::visit(AST::IdentifierPropertyName *node) { - out << JavaScriptEnginePrivate::toString(node->id); + out << Engine::toString(node->id); return false; } @@ -359,7 +359,7 @@ void PrettyPretty::endVisit(AST::IdentifierPropertyName *node) bool PrettyPretty::visit(AST::StringLiteralPropertyName *node) { - QString lit = JavaScriptEnginePrivate::toString(node->id); + QString lit = Engine::toString(node->id); lit.replace(QLatin1String("\\"), QLatin1String("\\\\")); out << lit; return false; @@ -398,7 +398,7 @@ void PrettyPretty::endVisit(AST::ArrayMemberExpression *node) bool PrettyPretty::visit(AST::FieldMemberExpression *node) { accept(node->base); - out << "." << JavaScriptEnginePrivate::toString(node->name); + out << "." << Engine::toString(node->name); return false; } @@ -803,7 +803,7 @@ void PrettyPretty::endVisit(AST::VariableStatement *node) bool PrettyPretty::visit(AST::VariableDeclaration *node) { - out << JavaScriptEnginePrivate::toString(node->name); + out << Engine::toString(node->name); if (node->expression) { out << " = "; accept(node->expression); @@ -959,7 +959,7 @@ bool PrettyPretty::visit(AST::ContinueStatement *node) { out << "continue"; if (node->label) { - out << " " << JavaScriptEnginePrivate::toString(node->label); + out << " " << Engine::toString(node->label); } out << ";"; return false; @@ -974,7 +974,7 @@ bool PrettyPretty::visit(AST::BreakStatement *node) { out << "break"; if (node->label) { - out << " " << JavaScriptEnginePrivate::toString(node->label); + out << " " << Engine::toString(node->label); } out << ";"; return false; @@ -1095,7 +1095,7 @@ void PrettyPretty::endVisit(AST::DefaultClause *node) bool PrettyPretty::visit(AST::LabelledStatement *node) { - out << JavaScriptEnginePrivate::toString(node->label) << ": "; + out << Engine::toString(node->label) << ": "; return true; } @@ -1123,7 +1123,7 @@ bool PrettyPretty::visit(AST::TryStatement *node) out << "try "; acceptAsBlock(node->statement); if (node->catchExpression) { - out << " catch (" << JavaScriptEnginePrivate::toString(node->catchExpression->name) << ") "; + out << " catch (" << Engine::toString(node->catchExpression->name) << ") "; acceptAsBlock(node->catchExpression->statement); } if (node->finallyExpression) { @@ -1166,13 +1166,13 @@ bool PrettyPretty::visit(AST::FunctionDeclaration *node) out << "function"; if (node->name) - out << " " << JavaScriptEnginePrivate::toString(node->name); + out << " " << Engine::toString(node->name); // the arguments out << "("; for (AST::FormalParameterList *it = node->formals; it; it = it->next) { if (it->name) - out << JavaScriptEnginePrivate::toString(it->name); + out << Engine::toString(it->name); if (it->next) out << ", "; @@ -1205,13 +1205,13 @@ bool PrettyPretty::visit(AST::FunctionExpression *node) out << "function"; if (node->name) - out << " " << JavaScriptEnginePrivate::toString(node->name); + out << " " << Engine::toString(node->name); // the arguments out << "("; for (AST::FormalParameterList *it = node->formals; it; it = it->next) { if (it->name) - out << JavaScriptEnginePrivate::toString(it->name); + out << Engine::toString(it->name); if (it->next) out << ", "; |