MCPcopy Create free account
hub / github.com/AMReX-Codes/amrex / defined_modules

Method defined_modules

Tools/F_scripts/dep.py:86–107  ·  view source on GitHub ↗

determine what modules this file provides -- we work off of the preprocessed file if it exists.

(self)

Source from the content-addressed store, hash-verified

84
85
86 def defined_modules(self):
87 """determine what modules this file provides -- we work off of the
88 preprocessed file if it exists."""
89
90 defines = []
91
92 with io.open(self.search_name(), "r", encoding="latin-1") as f:
93
94 for line in f:
95
96 # strip off the comments
97 idx = line.find("!")
98 line = line[:idx]
99
100 # we want a module definition itself, not a 'module procedure'
101 # also, Fortran is case-insensitive
102 rebreak = module_re.search(line)
103 rebreak2 = module_proc_re.search(line)
104 if rebreak and not rebreak2:
105 defines.append(rebreak.group(4).lower())
106
107 return defines
108
109
110 def needed_modules(self):

Callers 1

doitFunction · 0.95

Calls 2

search_nameMethod · 0.95
appendMethod · 0.45

Tested by

no test coverage detected