aboutsummaryrefslogtreecommitdiff
path: root/main.m4
diff options
context:
space:
mode:
authorGravatar Moon Flower <moon@coffin.ir> 2025-02-22 18:10:15 +0330
committerGravatar Moon Flower <moon@coffin.ir> 2025-02-22 18:10:15 +0330
commit41f68c38e85a91b3bb5522b89f989fe2ca64f0a6 (patch)
tree8f9384337fd87469bda79103c690add802475c43 /main.m4
woohoo
Diffstat (limited to 'main.m4')
-rw-r--r--main.m431
1 files changed, 31 insertions, 0 deletions
diff --git a/main.m4 b/main.m4
new file mode 100644
index 0000000..8b88120
--- /dev/null
+++ b/main.m4
@@ -0,0 +1,31 @@
+#ifndef moonshine_m4_header
+#define moonshine_m4_header
+
+dnl This is m4 preprocessor magic.
+dnl You can safely ignore it, as it is toxic and radioactive to humans.
+// # Autogenerated by m4
+// # Don't modify this, modify the main.m4 file instead.
+dnl
+dnl
+changequote(`[', `]')dnl
+define([set], defn([define]))dnl
+undefine([define])dnl
+
+#define p_cat(a, b) a##b
+#define cat(a, b) p_cat(a, b)
+
+#define dump_or_continue_0(...)
+#define dump_or_continue_01(...) __VA_ARGS__
+
+set([_expand], [#define EXPAND_$3_$2(x, ...) $3(x); cat(dump_or_continue_0, __VA_OPT__(1))(EXPAND_$3_$1(__VA_ARGS__))])dnl
+set([expand], [ifelse([$1], [1], [#define EXPAND_$2_$1(x, ...) $2(x)], [_expand(decr($1), $1, $2)])])dnl
+dnl
+set([build_expander], [ifelse([$1], [0], [], [expand($1, $2)
+build_expander(decr($1), $2)dnl
+])])dnl
+set([define_expander], [#define EXPAND_$2(...) EXPAND_$2_$1(__VA_ARGS__)
+build_expander($1, $2)])dnl
+dnl
+define_expander([512], [print_local])
+
+#endif