summaryrefslogtreecommitdiffstats
path: root/src/declarative/qml/qmlscriptparser.cpp
diff options
context:
space:
mode:
authorRoberto Raggi <roberto.raggi@nokia.com>2009-05-14 10:29:45 (GMT)
committerRoberto Raggi <roberto.raggi@nokia.com>2009-05-14 10:29:45 (GMT)
commite3ea232cdb9116914df533b423f25ffd7384a78b (patch)
tree677e65e223e0c1a378deae257e638692d1a20551 /src/declarative/qml/qmlscriptparser.cpp
parent3bf4db673c3e74ab9a4c3319fd7a1df15ff52ea9 (diff)
downloadQt-e3ea232cdb9116914df533b423f25ffd7384a78b.zip
Qt-e3ea232cdb9116914df533b423f25ffd7384a78b.tar.gz
Qt-e3ea232cdb9116914df533b423f25ffd7384a78b.tar.bz2
Some (internal) API cleanup.
Diffstat (limited to 'src/declarative/qml/qmlscriptparser.cpp')
-rw-r--r--src/declarative/qml/qmlscriptparser.cpp7
1 files changed, 3 insertions, 4 deletions
diff --git a/src/declarative/qml/qmlscriptparser.cpp b/src/declarative/qml/qmlscriptparser.cpp
index 10518d7..9d6b018 100644
--- a/src/declarative/qml/qmlscriptparser.cpp
+++ b/src/declarative/qml/qmlscriptparser.cpp
@@ -632,17 +632,16 @@ bool QmlScriptParser::parse(const QByteArray &data, const QUrl &url)
QTextStream stream(data, QIODevice::ReadOnly);
const QString code = stream.readAll();
- Parser parser;
Engine engine;
NodePool nodePool(fileName, &engine);
- engine.setNodePool(&nodePool);
Lexer lexer(&engine);
lexer.setCode(code, /*line = */ 1);
- engine.setLexer(&lexer);
- if (! parser.parse(&engine) || !_errors.isEmpty()) {
+ Parser parser(&engine);
+
+ if (! parser.parse() || !_errors.isEmpty()) {
// Extract errors from the parser
foreach (const DiagnosticMessage &m, parser.diagnosticMessages()) {