File tree Expand file tree Collapse file tree 2 files changed +36
-0
lines changed
Expand file tree Collapse file tree 2 files changed +36
-0
lines changed Original file line number Diff line number Diff line change @@ -96,6 +96,7 @@ module.exports = grammar(C, {
9696 [ $ . expression_statement , $ . _for_statement_body ] ,
9797 [ $ . init_statement , $ . _for_statement_body ] ,
9898 [ $ . field_expression , $ . template_method , $ . template_type ] ,
99+ [ $ . field_expression , $ . template_method ] ,
99100 [ $ . qualified_field_identifier , $ . template_method , $ . template_type ] ,
100101 ] ,
101102
@@ -1083,6 +1084,7 @@ module.exports = grammar(C, {
10831084 $ . destructor_name ,
10841085 $ . template_method ,
10851086 alias ( $ . dependent_field_identifier , $ . dependent_name ) ,
1087+ $ . operator_name ,
10861088 ) ) ,
10871089 ) ,
10881090
Original file line number Diff line number Diff line change @@ -618,3 +618,37 @@ void foo(int a) {
618618 (case_statement
619619 (co_yield_statement
620620 (identifier))))))))
621+
622+ ================================================================================
623+ Explicit calls to overloaded operators
624+ ================================================================================
625+
626+ void foo() {
627+ obj.operator->("arg");
628+ obj.operator==(4);
629+ }
630+
631+ --------------------------------------------------------------------------------
632+
633+ (translation_unit
634+ (function_definition
635+ (primitive_type)
636+ (function_declarator
637+ (identifier)
638+ (parameter_list))
639+ (compound_statement
640+ (expression_statement
641+ (call_expression
642+ (field_expression
643+ (identifier)
644+ (operator_name))
645+ (argument_list
646+ (string_literal
647+ (string_content)))))
648+ (expression_statement
649+ (call_expression
650+ (field_expression
651+ (identifier)
652+ (operator_name))
653+ (argument_list
654+ (number_literal)))))))
You can’t perform that action at this time.
0 commit comments