diff options
author | Roberto Raggi <roberto.raggi@nokia.com> | 2009-05-14 14:05:27 (GMT) |
---|---|---|
committer | Roberto Raggi <roberto.raggi@nokia.com> | 2009-05-14 14:05:27 (GMT) |
commit | a896219edac2db3321e5c012bcdb830c698efc1e (patch) | |
tree | 31e8c7fd78b3270316b17491c669705628cbb2dd /src/declarative/qml/parser/javascriptengine_p.cpp | |
parent | ce4e9004d23f4cb5bb03292436db81934c85921f (diff) | |
download | Qt-a896219edac2db3321e5c012bcdb830c698efc1e.zip Qt-a896219edac2db3321e5c012bcdb830c698efc1e.tar.gz Qt-a896219edac2db3321e5c012bcdb830c698efc1e.tar.bz2 |
Compile with gcc 4.2.
Diffstat (limited to 'src/declarative/qml/parser/javascriptengine_p.cpp')
-rw-r--r-- | src/declarative/qml/parser/javascriptengine_p.cpp | 35 |
1 files changed, 33 insertions, 2 deletions
diff --git a/src/declarative/qml/parser/javascriptengine_p.cpp b/src/declarative/qml/parser/javascriptengine_p.cpp index 5debfd3..d893a90 100644 --- a/src/declarative/qml/parser/javascriptengine_p.cpp +++ b/src/declarative/qml/parser/javascriptengine_p.cpp @@ -34,11 +34,11 @@ QT_BEGIN_NAMESPACE +namespace JavaScript { + uint qHash(const JavaScript::NameId &id) { return qHash(id.asString()); } -namespace JavaScript { - QString numberToString(double value) { return QString::number(value); } @@ -155,6 +155,37 @@ double integerFromString(const QString &str, int radix) return integerFromString(ba.constData(), ba.size(), radix); } + +Engine::Engine() + : _lexer(0), _nodePool(0) +{ } + +Engine::~Engine() +{ } + +QSet<NameId> Engine::literals() const +{ return _literals; } + +NameId *Engine::intern(const QChar *u, int s) +{ return const_cast<NameId *>(&*_literals.insert(NameId(u, s))); } + +QString Engine::toString(NameId *id) +{ return id->asString(); } + +Lexer *Engine::lexer() const +{ return _lexer; } + +void Engine::setLexer(Lexer *lexer) +{ _lexer = lexer; } + +NodePool *Engine::nodePool() const +{ return _nodePool; } + +void Engine::setNodePool(NodePool *nodePool) +{ _nodePool = nodePool; } + + + } // end of namespace JavaScript QT_END_NAMESPACE |