From 9cd1652a387e7037c13d34059acea4ed93595bdf Mon Sep 17 00:00:00 2001 From: Sergi Siso Date: Mon, 15 Jul 2024 17:10:04 +0100 Subject: [PATCH] #384 Change matching order of Structure_Constructor and Function_Reference in primary --- src/fparser/two/Fortran2003.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/fparser/two/Fortran2003.py b/src/fparser/two/Fortran2003.py index a714f405..4ce1fb61 100644 --- a/src/fparser/two/Fortran2003.py +++ b/src/fparser/two/Fortran2003.py @@ -5628,8 +5628,10 @@ class `Base` matches rules in list order). "Constant", "Designator", "Array_Constructor", - "Structure_Constructor", + # Function_Reference is purposely above Structure_Constructure so if they + # can not be disambiguated, they will be matched as Function_Reference "Function_Reference", + "Structure_Constructor", "Type_Param_Inquiry", "Type_Param_Name", "Parenthesis",