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

Function parse_name_for_bind

numpy/f2py/crackfortran.py:969–977  ·  view source on GitHub ↗
(line)

Source from the content-addressed store, hash-verified

967 return None, [], None
968
969def parse_name_for_bind(line):
970 pattern = re.compile(r'bind\(\s*(?P<lang>[^,]+)(?:\s*,\s*name\s*=\s*["\'](?P<name>[^"\']+)["\']\s*)?\)', re.I)
971 match = pattern.search(line)
972 bind_statement = None
973 if match:
974 bind_statement = match.group(0)
975 # Remove the 'bind' construct from the line.
976 line = line[:match.start()] + line[match.end():]
977 return line, bind_statement
978
979def _resolvenameargspattern(line):
980 line, bind_cname = parse_name_for_bind(line)

Callers 1

_resolvenameargspatternFunction · 0.85

Calls 1

compileMethod · 0.45

Tested by

no test coverage detected