slang: Differentiate between uints and floats.
authorMichal Krol <michal@vmware.com>
Tue, 22 Sep 2009 10:54:45 +0000 (12:54 +0200)
committerMichal Krol <michal@vmware.com>
Tue, 22 Sep 2009 10:54:45 +0000 (12:54 +0200)
src/mesa/shader/slang/library/slang_shader.syn
src/mesa/shader/slang/library/slang_shader_syn.h
src/mesa/shader/slang/slang_compile.c

index f6bf7f1e5462e4868954f0a816c144ff9224947f..11f9825c0160c1af4f70407f3b8c26dc4dd0e5dd 100644 (file)
@@ -1362,10 +1362,10 @@ identifier
    "@ID" .emit *;
 
 float
-   "@NUM" .emit 1 .emit *;
+   "@FLOAT" .emit 1 .emit *;
 
 integer
-   "@NUM" .emit 1 .emit *;
+   "@UINT" .emit 1 .emit *;
 
 boolean
    "true" .emit '1' .emit '\0' .or
index 9a56643d2f1ba7b9078952e2188cd844bbd376ae..488cf1a5044bd6e8dbc0f51cdfe43986a0d76309 100644 (file)
 "identifier\n"
 " \"@ID\" .emit *;\n"
 "float\n"
-" \"@NUM\" .emit 1 .emit *;\n"
+" \"@FLOAT\" .emit 1 .emit *;\n"
 "integer\n"
-" \"@NUM\" .emit 1 .emit *;\n"
+" \"@UINT\" .emit 1 .emit *;\n"
 "boolean\n"
 " \"true\" .emit '1' .emit '\\0' .or\n"
 " \"false\" .emit '0' .emit '\\0';\n"
index fb452e5d2c5dab283d7574aa376fc4a5c400a28c..ce3a85ebf8ac223569935a2c105a82dcdd258c41 100644 (file)
@@ -2683,7 +2683,8 @@ compile_with_grammar(grammar id, const char *source, slang_code_unit * unit,
          case SL_PP_QUESTION:
          case SL_PP_COLON:
          case SL_PP_IDENTIFIER:
-         case SL_PP_NUMBER:
+         case SL_PP_UINT:
+         case SL_PP_FLOAT:
             *dst++ = *src++;
             break;