Commit c178ec0d authored by Kenneth Graunke's avatar Kenneth Graunke

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=64087Signed-off-by: default avatarKenneth Graunke <kenneth@whitecape.org>
Reviewed-by: default avatarMatt Turner <mattst88@gmail.com>
Cc: mesa-stable@lists.freedesktop.org
parent 4d7899fe
......@@ -352,7 +352,7 @@ layout {
return LAYOUT_TOK;
} else {
yylval->identifier = strdup(yytext);
return IDENTIFIER;
return classify_identifier(yyextra, yytext);
}
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment