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>
This commit is contained in:
Lars Knoll 2018-04-10 17:17:12 +02:00
parent 9814c60536
commit 19d3b7eb4c
1 changed files with 5 additions and 6 deletions

View File

@ -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