aboutsummaryrefslogtreecommitdiff
path: root/source/table.c
diff options
context:
space:
mode:
Diffstat (limited to 'source/table.c')
-rw-r--r--source/table.c16
1 files changed, 16 insertions, 0 deletions
diff --git a/source/table.c b/source/table.c
new file mode 100644
index 0000000..e1bc9a8
--- /dev/null
+++ b/source/table.c
@@ -0,0 +1,16 @@
+@table(name, str) MyEnumTable
+{
+ { A "A" }
+ { B "B" }
+ { C "C" }
+}
+
+typedef enum {
+@expand(MyEnumTable a)
+ `MyEnum_$(a.name), // lololol`
+MyEnum_Count
+} MyEnum;
+
+char *StringTable[MyEnumCount] = {
+@expand(MyEnumTable a) `$(a.str),`
+}