INNER CODE UNIT · Python
process_file
michelp/pgsodium · docgen.py:5
def process_file(path):
with open(path, "r") as f:
content = f.read()
s = content.lstrip()
if not s.startswith("/* doctest"):
return
end = s.find("*/")
if end == -1:
return
comment = s[: end + 2]
lines = comment.splitlines()
if not lines:
return
first = lines[0]
if not first.startswith("/* doctest"):
return
target = first[len("/* doctest"):].strip()
if target.startswith("/"):