INNER CODE UNIT · Python
process_file
Dreamtowards/Ethertia · lib/sol2-3.3.0/list_headers.py:44
def process_file(filename):
global includes
filename = os.path.normpath(filename)
relativefilename = filename.replace(script_path + os.sep, "").replace(
"\\", "/")
rel_filename = os.path.relpath(filename, script_path).replace('\\', '/')
if rel_filename in includes:
return
empty_line_state = True
with open(filename, 'r', encoding='utf-8') as f:
includes.add(rel_filename)
for line in f:
# skip comments