Commit 0a917dc9 authored by sparonuz's avatar sparonuz
Browse files

[Issue#122]: This can be used to detect uncoherence between spelling of declaration and dummy arg

parent d4c74a36
......@@ -184,6 +184,10 @@ def create_subprogram(module, header, routine_name, dummy_arguments, var_declara
subprogram.use_only_variables = [m.lower().split("use")[1].strip() for m in used_modules]
# Reverse approach
dummy_arguments = [x for x in dummy_arguments]
# var_names = [AttributeParser.get_variable_name(var.split('::')[1])[0] for var in var_declarations]
# for da in dummy_arguments:
# if da not in var_names:
# print("This variable has a different spelling btw declaration and dummy")
for declaration in var_declarations:
pattern = "(.*)::(.*)"
m = re.search(pattern, declaration)
......@@ -222,7 +226,6 @@ def create_subprogram(module, header, routine_name, dummy_arguments, var_declara
for index, dummy_argument in enumerate(dummy_arguments):
if dummy_argument in found_vars:
# TODO: save position of already found vars
subprogram.get_variable_by_name(dummy_argument).position = index
continue
# If it's not found its an implicitly declared variable
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment