summaryrefslogtreecommitdiff
path: root/docs/filter_global_asm.py
diff options
context:
space:
mode:
authorTharo <17233964+Thar0@users.noreply.github.com>2020-06-28 19:42:16 +0100
committerGitHub <noreply@github.com>2020-06-28 14:42:16 -0400
commit27d059b041b3afee46b2812ec65e84df2329b95f (patch)
tree49db3ae927cf3769432010589c00f2dd15013409 /docs/filter_global_asm.py
parenta316f8d88d1d00bdb27c57080249c0f1dcc1f815 (diff)
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
Diffstat (limited to 'docs/filter_global_asm.py')
-rw-r--r--docs/filter_global_asm.py11
1 files changed, 11 insertions, 0 deletions
diff --git a/docs/filter_global_asm.py b/docs/filter_global_asm.py
new file mode 100644
index 000000000..8bffd3c83
--- /dev/null
+++ b/docs/filter_global_asm.py
@@ -0,0 +1,11 @@
+
+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()))