GLSL: Fix recovery token order to avoid infinite loop.

The case 'a = b ? ;' recovered with T_NUMBER, T_COMMA, T_NUMBER, ...

Task-number: QTCREATORBUG-7517
Change-Id: I3546266b21d11ce08e4af1331be94a78d3b24c19
Reviewed-by: Roberto Raggi <roberto.raggi@nokia.com>
This commit is contained in:
Christian Kamm
2012-08-06 11:29:55 +02:00
parent f6fe3c76bf
commit e91045469d
3 changed files with 322 additions and 322 deletions

View File

@@ -456,7 +456,7 @@ private:
#include <iostream>
#include <cstdio>
#include <cassert>
#include <QtCore/QDebug>
#include <QDebug>
using namespace GLSL;
@@ -591,7 +591,7 @@ AST *Parser::parse(int startToken)
static int tks[] = {
T_RIGHT_BRACE, T_RIGHT_PAREN, T_RIGHT_BRACKET,
T_SEMICOLON, T_COMMA, T_COLON,
T_SEMICOLON, T_COLON, T_COMMA,
T_NUMBER, T_TYPE_NAME, T_IDENTIFIER,
T_LEFT_BRACE, T_LEFT_PAREN, T_LEFT_BRACKET,
T_WHILE,

File diff suppressed because it is too large Load Diff

View File

@@ -1,5 +1,5 @@
#line 217 "./glsl.g"
#line 215 "./glsl.g"
/**************************************************************************
**