forked from qt-creator/qt-creator
GLSL: Avoid infinite loop at error recovery
For error recovery additional tokens are tried to produce a valid
grammar rule.
For the specific case in the bug report
for(int x=0; x y
the two consecutive identifiers in the end triggered an infinite loop
since the identifier token is also part of those additional tokens that
are tried.
Circumvent this by trying a more conservative list of tokens on the
second try.
Done-by: Erik Verbruggen
Change-Id: I271dddecf947a06ed3af5f9955ee630441533342
Task-number: QTCREATORBUG-18967
Reviewed-by: Erik Verbruggen <erik.verbruggen@qt.io>
Reviewed-by: Nikolai Kosjar <nikolai.kosjar@qt.io>
This commit is contained in: