380 changes: 226 additions & 154 deletions libc/include/CMakeLists.txt

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion libc/newhdrgen/class_implementation/classes/function.py
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ def __str__(self):
attributes_str = " ".join(self.attributes)
arguments_str = ", ".join(self.arguments)
if attributes_str == "":
result = f"{self.return_type} {self.name}({arguments_str});"
result = f"{self.return_type} {self.name}({arguments_str})"
else:
result = f"{attributes_str} {self.return_type} {self.name}({arguments_str})"
return result
8 changes: 4 additions & 4 deletions libc/newhdrgen/header.py
Original file line number Diff line number Diff line change
Expand Up @@ -60,24 +60,24 @@ def __str__(self):
current_guard = None
for function in self.functions:
if function.guard == None:
content.append(str(function) + "__NOEXCEPT")
content.append(str(function) + "__NOEXCEPT;")
content.append("")
else:
if current_guard == None:
current_guard = function.guard
content.append(f"#ifdef {current_guard}")
content.append(str(function) + "__NOEXCEPT")
content.append(str(function) + "__NOEXCEPT;")
content.append("")
elif current_guard == function.guard:
content.append(str(function) + "__NOEXCEPT")
content.append(str(function) + "__NOEXCEPT;")
content.append("")
else:
content.pop()
content.append(f"#endif // {current_guard}")
content.append("")
current_guard = function.guard
content.append(f"#ifdef {current_guard}")
content.append(str(function) + "__NOEXCEPT")
content.append(str(function) + "__NOEXCEPT;")
content.append("")
if current_guard != None:
content.pop()
Expand Down