qmljs: update parser

Update the qtcreator qmljs parser to the
one of Qt 5.12. It supports EcmaScript 7.

Task-number: QTCREATORBUG-20341
Change-Id: I0d1cff71402ba17e22cde6b46c65614e162280de
Reviewed-by: Erik Verbruggen <erik.verbruggen@qt.io>
This commit is contained in:
Marco Benelli
2018-10-16 15:32:58 +02:00
parent fe8a372773
commit 4646acad0d
46 changed files with 10604 additions and 5872 deletions

View File

@@ -35,7 +35,8 @@ bool InteractiveInterpreter::canEvaluate()
int yytos = -1;
setCode(m_code, 1);
m_tokens.append(T_FEED_JS_PROGRAM);
m_tokens.append(T_FEED_JS_SCRIPT);
m_tokens.append(T_FEED_JS_MODULE);
do {
if (++yytos == m_stateStack.size())

View File

@@ -160,15 +160,12 @@ public:
bool visit(VariableStatement *ast) override { test(ast); return true; }
bool visit(VariableDeclarationList *ast) override { test(ast); return true; }
bool visit(VariableDeclaration *ast) override { test(ast); return true; }
bool visit(ExpressionStatement *ast) override { test(ast); return true; }
bool visit(IfStatement *ast) override { test(ast); return true; }
bool visit(DoWhileStatement *ast) override { test(ast); return true; }
bool visit(WhileStatement *ast) override { test(ast); return true; }
bool visit(ForStatement *ast) override { test(ast); return true; }
bool visit(LocalForStatement *ast) override { test(ast); return true; }
bool visit(ForEachStatement *ast) override { test(ast); return true; }
bool visit(LocalForEachStatement *ast) override { test(ast); return true; }
bool visit(ContinueStatement *ast) override { test(ast); return true; }
bool visit(BreakStatement *ast) override { test(ast); return true; }
bool visit(ReturnStatement *ast) override { test(ast); return true; }