1
0
mirror of https://github.com/blawar/ooot.git synced 2024-07-04 18:13:37 +00:00
ooot/docs/filter_global_asm.py
Tharo 27d059b041
Configure Doxygen (#206)
* Configure Doxygen

* Clean up filter_global_asm.py

* Add documentation guide

* Fix small issue with markdown rendering

* Change @bug to lowercase in documenting guide

* Folder restructure, new logo

* Allow embedding LaTeX in doc comments, update Documenting guide

* Resize logo

* Change description to match new repo description, leave version number unspecified
2020-06-28 14:42:16 -04:00

12 lines
347 B
Python

import re
import sys
global_asm_regex = re.compile(r"#pragma GLOBAL_ASM((.)*)")
def repl_global_asm(cap):
return "/// " + cap.group(0).replace("#pragma ","") + "\n? " + cap.group(0).split("/")[-1].split(".s")[0] + "(?);"
with open(sys.argv[1], 'r') as infile:
sys.stdout.write(re.sub(global_asm_regex, repl_global_asm, infile.read()))