From c178ec0d7e8cc7007cb34e4f56f14261a057c200 Mon Sep 17 00:00:00 2001 From: Kenneth Graunke Date: Fri, 26 Jul 2013 12:31:06 -0700 Subject: 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 Reviewed-by: Matt Turner Cc: mesa-stable@lists.freedesktop.org --- src/glsl/glsl_lexer.ll | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/glsl/glsl_lexer.ll') diff --git a/src/glsl/glsl_lexer.ll b/src/glsl/glsl_lexer.ll index b95b254..9375230 100644 --- a/src/glsl/glsl_lexer.ll +++ b/src/glsl/glsl_lexer.ll @@ -352,7 +352,7 @@ layout { return LAYOUT_TOK; } else { yylval->identifier = strdup(yytext); - return IDENTIFIER; + return classify_identifier(yyextra, yytext); } } -- cgit v1.1