🎉 Initial commit

This commit is contained in:
Daniel Svitan
2025-05-05 21:27:02 +02:00
commit 74e99cf19a
3 changed files with 28 additions and 0 deletions

24
main.c Normal file
View File

@@ -0,0 +1,24 @@
#include <stdio.h>
#include <unistd.h>
#include <stdbool.h>
int main() {
int scope = 0;
bool in_string = false;
bool escape_next = false;
char c;
while (read(STDIN_FILENO, &c, 1) > 0) {
putchar(c);
if (c == '{' || c == '[') {
scope++;
putchar('\n');
}
else if (c == '}' || c == ']') {
scope--;
}
}
return 0;
}