Skip to content

Commit

Permalink
add optional parentheses for @operator
Browse files Browse the repository at this point in the history
  • Loading branch information
gewang committed Oct 1, 2023
1 parent d2590f7 commit fa9744d
Show file tree
Hide file tree
Showing 2 changed files with 764 additions and 706 deletions.
4 changes: 4 additions & 0 deletions src/core/chuck.y
Original file line number Diff line number Diff line change
Expand Up @@ -274,6 +274,10 @@ function_definition
{ $$ = new_op_overload( $1, $2, $3, $5, $7, $9, TRUE, FALSE, @1.first_line, @1.first_column, @5.first_column ); }
| function_decl static_decl type_decl2 AT_OP LPAREN arg_list RPAREN overloadable_operator code_segment
{ $$ = new_op_overload( $1, $2, $3, $8, $6, $9, TRUE, TRUE, @1.first_line, @1.first_column, @8.first_column ); }
| function_decl static_decl type_decl2 AT_OP LPAREN overloadable_operator RPAREN LPAREN arg_list RPAREN code_segment
{ $$ = new_op_overload( $1, $2, $3, $6, $9, $11, TRUE, FALSE, @1.first_line, @1.first_column, @5.first_column ); }
| function_decl static_decl type_decl2 AT_OP LPAREN arg_list RPAREN LPAREN overloadable_operator RPAREN code_segment
{ $$ = new_op_overload( $1, $2, $3, $9, $6, $11, TRUE, TRUE, @1.first_line, @1.first_column, @8.first_column ); }
;

class_decl
Expand Down
Loading

0 comments on commit fa9744d

Please sign in to comment.