[Mesa-stable] [PATCH] glsl: Classify "layout" like other identifiers.

Kenneth Graunke kenneth at whitecape.org
Fri Jul 26 12:34:44 PDT 2013


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 at whitecape.org>
Cc: Tapani Pälli <tapani.palli at intel.com>
Cc: mesa-stable at lists.freedesktop.org
---
 src/glsl/glsl_lexer.ll | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/glsl/glsl_lexer.ll b/src/glsl/glsl_lexer.ll
index 145119c..491dcec 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);
 		   }
 		}
 
-- 
1.8.3.3



More information about the mesa-stable mailing list