summaryrefslogtreecommitdiff
path: root/comp/cw/code/parser/parser.c
diff options
context:
space:
mode:
authorstandenboy <standenboy@seacrossedlovers.xyz>2024-04-30 14:22:45 +0100
committerstandenboy <standenboy@seacrossedlovers.xyz>2024-04-30 14:22:45 +0100
commitc460a26850eca5ded047d0eb0d183b861087aa53 (patch)
tree000c4a117746de71870fbee820809f7df49bcfcf /comp/cw/code/parser/parser.c
parent2e239a4ed2265f7c7dc2aabedfdb7d7b011704cb (diff)
write up update
Diffstat (limited to 'comp/cw/code/parser/parser.c')
-rw-r--r--comp/cw/code/parser/parser.c32
1 files changed, 0 insertions, 32 deletions
diff --git a/comp/cw/code/parser/parser.c b/comp/cw/code/parser/parser.c
deleted file mode 100644
index 3162841..0000000
--- a/comp/cw/code/parser/parser.c
+++ /dev/null
@@ -1,32 +0,0 @@
-#include <string.h>
-#include <stdio.h>
-#include <stdbool.h>
-
-#include "preprocessor.h"
-
-int main(int argc, char **argv){
- if (argc <= 1){
- printf("no args given!\n");
- return 1;
- }
- char *code = preprocessor(argc, argv);
- if (code == NULL){
- printf("falled to open file\n");
- return 1;
- }
- for (int i = 0; i < strlen(code); i++){
- if (code[i] == '{'){
- printf("\nopen-scope\n");
- } else if (code[i] == '}'){
- printf("\nclose-scope\n");
- }else {
- if (code[i] == '(')
- printf("\n");
- else if (code[i] != ')')
- printf("%c", code[i]);
- }
- }
- printf("\n");
- free(code);
- return 0;
-}