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

Function _resolvetypedefpattern

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

Source from the content-addressed store, hash-verified

957
958
959def _resolvetypedefpattern(line):
960 line = ''.join(line.split()) # removes whitespace
961 m1 = typedefpattern.match(line)
962 print(line, m1)
963 if m1:
964 attrs = m1.group('attributes')
965 attrs = [a.lower() for a in attrs.split(',')] if attrs else []
966 return m1.group('name'), attrs, m1.group('params')
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)

Callers 1

analyzelineFunction · 0.85

Calls 4

printFunction · 0.85
lowerMethod · 0.80
joinMethod · 0.45
splitMethod · 0.45

Tested by

no test coverage detected