summaryrefslogtreecommitdiffstats
path: root/src/glsl/glcpp/glcpp-lex.l
diff options
context:
space:
mode:
Diffstat (limited to 'src/glsl/glcpp/glcpp-lex.l')
-rw-r--r--src/glsl/glcpp/glcpp-lex.l6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/glsl/glcpp/glcpp-lex.l b/src/glsl/glcpp/glcpp-lex.l
index cfb9f2a18be..0d4bfc8d443 100644
--- a/src/glsl/glcpp/glcpp-lex.l
+++ b/src/glsl/glcpp/glcpp-lex.l
@@ -259,6 +259,12 @@ HEXADECIMAL_INTEGER 0[xX][0-9a-fA-F]+[uU]?
return OBJ_IDENTIFIER;
}
+<DEFINE>[^_a-zA-Z]{NONSPACE}* {
+ BEGIN INITIAL;
+ glcpp_error(yylloc, yyextra, "#define followed by a non-identifier: %s", yytext);
+ return INTEGER_STRING;
+}
+
{HASH}undef {
yyextra->space_tokens = 0;
return HASH_UNDEF;