compiler-lightning/src/helpers.c
2024-07-21 10:54:12 +12:00

10 lines
No EOL
220 B
C

#include <helpers.h>
#include <string.h>
#include <stdlib.h>
char* gen_ident(int indent) {
char* text = malloc(sizeof(char) * (indent + 1));
memset(text, ' ', indent);
text[indent] = '\0';
return text;
}