MCPcopy Create free account
hub / github.com/atcoder/ac-library / expand

Method expand

expander.py:66–81  ·  view source on GitHub ↗
(self, source: str, origname)

Source from the content-addressed store, hash-verified

64 return result
65
66 def expand(self, source: str, origname) -> str:
67 self.included = set()
68 result = [] # type: List[str]
69 linenum = 0
70 for line in source.splitlines():
71 linenum += 1
72 m = self.atcoder_include.match(line)
73 if m:
74 acl_path = self.find_acl(m.group(1))
75 result.extend(self.expand_acl(acl_path))
76 if origname:
77 result.append('#line ' + str(linenum + 1) + ' "' + origname + '"')
78 continue
79
80 result.append(line)
81 return '\n'.join(result)
82
83
84if __name__ == "__main__":

Callers 1

expander.pyFile · 0.80

Calls 2

find_aclMethod · 0.95
expand_aclMethod · 0.95

Tested by

no test coverage detected