diff options
author | Kenneth Graunke <kenneth@whitecape.org> | 2013-07-26 12:31:06 -0700 |
---|---|---|
committer | Ian Romanick <ian.d.romanick@intel.com> | 2013-08-05 15:41:14 -0700 |
commit | 4953bf383757a48edc573738ab01d9d687e6e520 (patch) | |
tree | 5870b90019bdff232744cabdf83aed6b5b4dce6a /src/glsl | |
parent | c7bfe8772163d64d6870936e2c5a3b18b7725c18 (diff) |
glsl: Classify "layout" like other identifiers.
When "layout" isn't being lexed as LAYOUT_TOK, we should treat it like
an ordinary identifier. This means we need to classify it to determine
whether we should return IDENTIFIER, TYPE_IDENTIFIER, or NEW_IDENTIFIER.
Fixes the WebGL conformance test "shader-with-non-reserved-words."
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=64087
Signed-off-by: Kenneth Graunke <kenneth@whitecape.org>
Reviewed-by: Matt Turner <mattst88@gmail.com>
Cc: mesa-stable@lists.freedesktop.org
(cherry picked from commit c178ec0d7e8cc7007cb34e4f56f14261a057c200)
Diffstat (limited to 'src/glsl')
-rw-r--r-- | src/glsl/glsl_lexer.ll | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/glsl/glsl_lexer.ll b/src/glsl/glsl_lexer.ll index dbc8154e499..2c581b23d21 100644 --- a/src/glsl/glsl_lexer.ll +++ b/src/glsl/glsl_lexer.ll @@ -371,7 +371,7 @@ layout { return LAYOUT_TOK; } else { yylval->identifier = strdup(yytext); - return IDENTIFIER; + return classify_identifier(yyextra, yytext); } } |