HLSL array declarations can be expressions, like "float4 x[(1 + 1) / 2];" ...
authorRyan C. Gordon <icculus@icculus.org>
Sun, 23 Aug 2009 01:32:21 -0400
changeset 782 778852cf7aaf
parent 781 8b80cf8692a4
child 783 49b40da02528
HLSL array declarations can be expressions, like "float4 x[(1 + 1) / 2];" ...
mojoshader_parser_hlsl.lemon
--- a/mojoshader_parser_hlsl.lemon	Sun Aug 23 01:28:43 2009 -0400
+++ b/mojoshader_parser_hlsl.lemon	Sun Aug 23 01:32:21 2009 -0400
@@ -188,7 +188,7 @@
 variable_lowlevel ::= packoffset.
 variable_lowlevel ::= register.
 
-scalar_or_array ::= identifier LBRACKET INT_CONSTANT RBRACKET.
+scalar_or_array ::= identifier LBRACKET expression RBRACKET.
 scalar_or_array ::= identifier.
 
 packoffset ::= PACKOFFSET LPAREN identifier identifier RPAREN.