INNER CODE UNIT · Python
is_include_guard
Dreamtowards/Ethertia · lib/sol2-3.3.0/list_headers.py:39
def is_include_guard(line):
return ifndef_cpp.match(line) or define_cpp.match(
line) or endif_cpp.match(line) or pragma_once_cpp.match(line)
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