lexer + parser: add formatting for enums + build script: spaces -> tabs

This commit is contained in:
2026-04-17 20:20:31 +02:00
parent f09a36fb27
commit 055f56fcc2
6 changed files with 91 additions and 30 deletions

View File

@@ -15,7 +15,7 @@ void print_node(noomP_Node* node, noom_uint_t depth) {
printf("{\n");
tab(depth+1);
printf("type: %d\n", node->type);
printf("type: %s\n", noomP_formatNodeType(node->type));
tab(depth+1);
printf("location: %lld\n", node->source_offset);
@@ -42,7 +42,7 @@ int main(int argc, char** argv) {
while (1) {
noomL_lex(code, pos, &token);
printf("%d ", token.type);
printf("%s ", noomL_formatTokenType(token.type));
for (noom_uint_t i = 0; i < token.length; i++) putchar((code + token.offset)[i]);
putchar('\n');