MCPcopy Create free account
hub / github.com/numpy/numpy / analyzeargs

Function analyzeargs

numpy/f2py/crackfortran.py:3179–3203  ·  view source on GitHub ↗
(block)

Source from the content-addressed store, hash-verified

3177
3178
3179def analyzeargs(block):
3180 setmesstext(block)
3181 implicitrules, _ = buildimplicitrules(block)
3182 if 'args' not in block:
3183 block['args'] = []
3184 args = []
3185 for a in block['args']:
3186 a = expr2name(a, block, args)
3187 args.append(a)
3188 block['args'] = args
3189 if 'entry' in block:
3190 for k, args1 in list(block['entry'].items()):
3191 for a in args1:
3192 if a not in block['vars']:
3193 block['vars'][a] = {}
3194
3195 for b in block['body']:
3196 if b['name'] in args:
3197 if 'externals' not in block:
3198 block['externals'] = []
3199 if b['name'] not in block['externals']:
3200 block['externals'].append(b['name'])
3201 if 'result' in block and block['result'] not in block['vars']:
3202 block['vars'][block['result']] = {}
3203 return block
3204
3205determineexprtype_re_1 = re.compile(r'\A\(.+?,.+?\)\Z', re.I)
3206determineexprtype_re_2 = re.compile(r'\A[+-]?\d+(_(?P<name>\w+)|)\Z', re.I)

Callers 1

postcrackFunction · 0.85

Calls 3

setmesstextFunction · 0.85
buildimplicitrulesFunction · 0.85
expr2nameFunction · 0.85

Tested by

no test coverage detected