MCPcopy Index your code
hub / github.com/numpy/numpy / markoutercomma

Function markoutercomma

numpy/f2py/crackfortran.py:870–887  ·  view source on GitHub ↗
(line, comma=',')

Source from the content-addressed store, hash-verified

868
869
870def markoutercomma(line, comma=','):
871 l = ''
872 f = 0
873 before, after = split_by_unquoted(line, comma + '()')
874 l += before
875 while after:
876 if (after[0] == comma) and (f == 0):
877 l += '@' + comma + '@'
878 else:
879 l += after[0]
880 if after[0] == '(':
881 f += 1
882 elif after[0] == ')':
883 f -= 1
884 before, after = split_by_unquoted(after[1:], comma + '()')
885 l += before
886 assert not f, repr((f, line, l))
887 return l
888
889def unmarkouterparen(line):
890 r = line.replace('@(@', '(').replace('@)@', ')')

Callers 9

getinitFunction · 0.85
sign2mapFunction · 0.85
_simplifyargsFunction · 0.85
analyzelineFunction · 0.85
updatevarsFunction · 0.85
cracktypespecFunction · 0.85
analyzecommonFunction · 0.85
analyzevarsFunction · 0.85
determineexprtypeFunction · 0.85

Calls 1

split_by_unquotedFunction · 0.85

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…