Skip to content

Commit

Permalink
Fixed constructor syntax parsing.
Browse files Browse the repository at this point in the history
  • Loading branch information
icculus committed Oct 14, 2010
1 parent d81c004 commit b3de19c
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion mojoshader_parser_hlsl.lemon
Expand Up @@ -468,7 +468,7 @@ postfix_expr(A) ::= primary_expr(B). { A = B; }
postfix_expr(A) ::= postfix_expr(B) LBRACKET expression(C) RBRACKET. { A = new_binary_expr(ctx, AST_OP_DEREF_ARRAY, B, C); }
postfix_expr(A) ::= postfix_expr(B) LPAREN RPAREN. { A = new_binary_expr(ctx, AST_OP_CALLFUNC, B, NULL); }
postfix_expr(A) ::= postfix_expr(B) LPAREN argument_expr_list(C) RPAREN. { A = new_binary_expr(ctx, AST_OP_CALLFUNC, B, C); }
postfix_expr(A) ::= datatype(B) LPAREN argument_expr_list(C) RPAREN. { A = NULL; new_constructor_expr(ctx, B, C); } // HLSL constructor
postfix_expr(A) ::= datatype(B) LPAREN argument_expr_list(C) RPAREN. { A = new_constructor_expr(ctx, B, C); } // HLSL constructor
postfix_expr(A) ::= postfix_expr(B) DOT IDENTIFIER(C). { A = new_binary_expr(ctx, AST_OP_DEREF_STRUCT, B, new_identifier_expr(ctx, C.string)); }
postfix_expr(A) ::= postfix_expr(B) PLUSPLUS. { A = new_unary_expr(ctx, AST_OP_POSTINCREMENT, B); }
postfix_expr(A) ::= postfix_expr(B) MINUSMINUS. { A = new_unary_expr(ctx, AST_OP_POSTDECREMENT, B); }
Expand Down

0 comments on commit b3de19c

Please sign in to comment.