aboutsummaryrefslogtreecommitdiffstats
path: root/src/libs/qmljs/qmljssimplereader.cpp
diff options
context:
space:
mode:
authorThomas Hartmann <[email protected]>2012-11-08 13:41:28 +0100
committerThomas Hartmann <[email protected]>2012-11-21 14:19:57 +0100
commit279cc09cc06c5934f96c4b1c4bae82170906162c (patch)
tree85e1a729b42139c90845439f8419a6a3990a9fbe /src/libs/qmljs/qmljssimplereader.cpp
parent1fdd172772fe22875f6d56b8fe61da4cce21c01b (diff)
QmlJS::SimpleReader: simple bugfix (initialisation)
The user can use readFromSource repeatedly. Change-Id: Ibb7da95743ae6ecfd4492bb0163ff3599d5bcdb5 Reviewed-by: Thomas Hartmann <[email protected]>
Diffstat (limited to 'src/libs/qmljs/qmljssimplereader.cpp')
-rw-r--r--src/libs/qmljs/qmljssimplereader.cpp3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/libs/qmljs/qmljssimplereader.cpp b/src/libs/qmljs/qmljssimplereader.cpp
index c4d60673e9b..250b7f8c0a9 100644
--- a/src/libs/qmljs/qmljssimplereader.cpp
+++ b/src/libs/qmljs/qmljssimplereader.cpp
@@ -135,6 +135,9 @@ bool SimpleAbstractStreamReader::readFile(const QString &fileName)
bool SimpleAbstractStreamReader::readFromSource(const QString &source)
{
+ m_errors.clear();
+ m_currentSourceLocation = AST::SourceLocation();
+
Engine engine;
Lexer lexer(&engine);
Parser parser(&engine);