Skip to content

Commit

Permalink
Allow vector initializers, like "float4 x = {a,b,c,d};"
Browse files Browse the repository at this point in the history
  • Loading branch information
icculus committed Aug 26, 2009
1 parent bca8443 commit ad30ea6
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion mojoshader_parser_hlsl.lemon
Expand Up @@ -21,7 +21,7 @@

// Some shift-reduce conflicts are basically unavoidable, but if the final
// conflict count matches this value, we consider it known and acceptable.
%expect 1
%expect 2

%start_symbol shader
%token_prefix TOKEN_HLSL_
Expand Down Expand Up @@ -224,6 +224,11 @@ variable_attribute ::= CONST.
variable_attribute ::= ROWMAJOR.
variable_attribute ::= COLUMNMAJOR.

initializer_block_list ::= expression.
initializer_block_list ::= initializer_block_list COMMA expression.
initializer_block ::= LBRACE initializer_block_list RBRACE.

initializer ::= ASSIGN initializer_block.
initializer ::= ASSIGN expression.

intrinsic_datatype ::= datatype_vector.
Expand Down

0 comments on commit ad30ea6

Please sign in to comment.