(block, args, tab='')
| 2206 | |
| 2207 | |
| 2208 | def analyzebody(block, args, tab=''): |
| 2209 | global usermodules, skipfuncs, onlyfuncs, f90modulevars |
| 2210 | |
| 2211 | setmesstext(block) |
| 2212 | |
| 2213 | maybe_private = { |
| 2214 | key: value |
| 2215 | for key, value in block['vars'].items() |
| 2216 | if 'attrspec' not in value or 'public' not in value['attrspec'] |
| 2217 | } |
| 2218 | |
| 2219 | body = [] |
| 2220 | for b in block['body']: |
| 2221 | b['parent_block'] = block |
| 2222 | if b['block'] in ['function', 'subroutine']: |
| 2223 | if args is not None and b['name'] not in args: |
| 2224 | continue |
| 2225 | else: |
| 2226 | as_ = b['args'] |
| 2227 | # Add private members to skipfuncs for gh-23879 |
| 2228 | if b['name'] in maybe_private.keys(): |
| 2229 | skipfuncs.append(b['name']) |
| 2230 | if b['name'] in skipfuncs: |
| 2231 | continue |
| 2232 | if onlyfuncs and b['name'] not in onlyfuncs: |
| 2233 | continue |
| 2234 | b['saved_interface'] = crack2fortrangen( |
| 2235 | b, '\n' + ' ' * 6, as_interface=True) |
| 2236 | |
| 2237 | else: |
| 2238 | as_ = args |
| 2239 | b = postcrack(b, as_, tab=tab + '\t') |
| 2240 | if b['block'] in ['interface', 'abstract interface'] and \ |
| 2241 | not b['body'] and not b.get('implementedby'): |
| 2242 | if 'f2pyenhancements' not in b: |
| 2243 | continue |
| 2244 | if b['block'].replace(' ', '') == 'pythonmodule': |
| 2245 | usermodules.append(b) |
| 2246 | else: |
| 2247 | if b['block'] == 'module': |
| 2248 | f90modulevars[b['name']] = b['vars'] |
| 2249 | body.append(b) |
| 2250 | return body |
| 2251 | |
| 2252 | |
| 2253 | def buildimplicitrules(block): |
no test coverage detected
searching dependent graphs…