Expand C tokens and parser expression support

This commit is contained in:
Krzosa Karol
2026-05-10 14:28:57 +02:00
parent 9792517c41
commit f0e5b6a273
5 changed files with 161 additions and 21 deletions

8
meta.c
View File

@@ -86,4 +86,12 @@ int main() {
}
}
printf("};\n");
printf("char *token_to_name[] = {\n");
for (int i = 0; i < ilen(kinds); i += 1) {
if (kinds[i].name) {
printf(" [TOK_%s] = \"%s\",\n", kinds[i].name, kinds[i].name);
}
}
printf("};\n");
}