diff options
author | Lars Knoll <lars.knoll@qt.io> | 2018-04-10 17:17:12 +0200 |
---|---|---|
committer | Lars Knoll <lars.knoll@qt.io> | 2018-04-25 17:50:05 +0000 |
commit | 19d3b7eb4c5fd806ea519771549df14ac965b79e (patch) | |
tree | 66ef6696bf39ebf2ad7c90ac21223326260e0250 /tests/auto/qml/qqmlparser | |
parent | 9814c60536128396177b94104c93411e5065300c (diff) |
Don't try to verify the AST after parse errors
In preparation for the ES6 changes, where one or two files
won't parse correctly anymore.
Change-Id: Ie83e684761b2d7dcdec1d44f67006f60fb6e500c
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
Diffstat (limited to 'tests/auto/qml/qqmlparser')
-rw-r--r-- | tests/auto/qml/qqmlparser/tst_qqmlparser.cpp | 11 |
1 files changed, 5 insertions, 6 deletions
diff --git a/tests/auto/qml/qqmlparser/tst_qqmlparser.cpp b/tests/auto/qml/qqmlparser/tst_qqmlparser.cpp index 2722a536b6..a36409a35e 100644 --- a/tests/auto/qml/qqmlparser/tst_qqmlparser.cpp +++ b/tests/auto/qml/qqmlparser/tst_qqmlparser.cpp @@ -186,13 +186,12 @@ void tst_qqmlparser::qmlParser() Lexer lexer(&engine); lexer.setCode(code, 1, qmlMode); Parser parser(&engine); - if (qmlMode) - parser.parse(); - else - parser.parseProgram(); + bool ok = qmlMode ? parser.parse() : parser.parseProgram(); - check::Check chk; - chk(parser.rootNode()); + if (ok) { + check::Check chk; + chk(parser.rootNode()); + } } #endif |