From cbdca328495a772716f14b1e95a7ab7d6450cc27 Mon Sep 17 00:00:00 2001 From: Elis Eriksson Date: Fri, 19 Jun 2026 21:39:16 +0200 Subject: Improve the shit No longer turing complete No longer depends on libc (good thing) Codegen is now unreadable (because i want it to be) Remove a couple of unnecessary includes Output C code to out.c when compiling Why the fuck are you reading this? --- src/lexer.c | 10 ---------- 1 file changed, 10 deletions(-) (limited to 'src/lexer.c') diff --git a/src/lexer.c b/src/lexer.c index 4f1fcd0..b4d11eb 100644 --- a/src/lexer.c +++ b/src/lexer.c @@ -1,9 +1,6 @@ #include "all.h" #include "ivec.h" -#include -#include #include -#include lexer_t lex_init(str *src) { lexer_t lx = {0}; @@ -17,10 +14,8 @@ lexer_t lex_init(str *src) { void lex_run(lexer_t *lx) { for (size_t i = 0; i < lx->src->length; i++) { - char c = lx->src->data[i]; lex_tok_e tok; - switch (c) { case '+': tok = LEX_PINC; @@ -49,24 +44,19 @@ void lex_run(lexer_t *lx) { default: continue; } - iv_push(&lx->tokens, tok); } - iv_push(&lx->tokens, LEX_EOF); } void lex_free(lexer_t *lx) { if (!lx) return; - iv_free(&lx->tokens); - if (lx->src) { free(lx->src->data); free(lx->src); } - lx->src = NULL; lx->pos = 0; } -- cgit v1.3-7-ge9ab