From 51eae02e78cfe6141b1496acd6e66ded233f35f7 Mon Sep 17 00:00:00 2001 From: Lars-Peter Clausen Date: Sat, 26 Feb 2022 12:54:24 +0100 Subject: [PATCH] Support class method calls without parenthesis It is possible to call a class method without parenthesis if no arguments are specified. At the moment this works when calling a class method by name. But when using the implicit class handle `this` or `super` it does not work. Add support for this. Signed-off-by: Lars-Peter Clausen --- parse.y | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/parse.y b/parse.y index 2b5876868..16b9b7931 100644 --- a/parse.y +++ b/parse.y @@ -6641,11 +6641,11 @@ statement_item /* This is roughly statement_item in the LRM */ $$ = tmp; } - | class_hierarchy_identifier '(' expression_list_with_nuls ')' ';' - { PCallTask*tmp = new PCallTask(*$1, *$3); + | class_hierarchy_identifier argument_list_parens_opt ';' + { PCallTask*tmp = new PCallTask(*$1, *$2); FILE_NAME(tmp, @1); delete $1; - delete $3; + delete $2; $$ = tmp; }