summaryrefslogtreecommitdiffstats
path: root/src/glsl/glsl_lexer.ll
diff options
context:
space:
mode:
authorKenneth Graunke <[email protected]>2013-07-26 12:31:06 -0700
committerKenneth Graunke <[email protected]>2013-07-27 10:31:38 -0700
commitc178ec0d7e8cc7007cb34e4f56f14261a057c200 (patch)
tree73610476c44f325cfa167c355d8f2909538987d6 /src/glsl/glsl_lexer.ll
parent4d7899fe81b6ffc521c6f9688e25bcde4012e556 (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 <[email protected]> Reviewed-by: Matt Turner <[email protected]> Cc: [email protected]
Diffstat (limited to 'src/glsl/glsl_lexer.ll')
-rw-r--r--src/glsl/glsl_lexer.ll2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/glsl/glsl_lexer.ll b/src/glsl/glsl_lexer.ll
index b95b254da01..93752307da4 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);
}
}