Plot project

This commit is contained in:
KK
2026-06-22 08:55:24 +02:00
parent bd97674f50
commit 25248c9055
16 changed files with 1750 additions and 0 deletions

32
a/main.c Normal file
View File

@@ -0,0 +1,32 @@
/*
- [ ] Compile simple int main program
- [x] Lex identifiers, keywords
- [ ] Add parsing of this
- [ ] Emit it
- [ ] Print error tokens location properly in lexer / parser and make it easy (not from source code)
- [ ] New line splicing, first source preprocessing stage. In order to properly handle '\\' backslash new line, we most likely need to preprocess the source in a initial pass. So at some point we need to introduce a stage that will create a buffer without wrong characters with a line / column mapping data structure.
*/
#include <assert.h>
#include <stdio.h>
#include <string.h>
#include <stdlib.h>
#include <ctype.h>
#include <stdint.h>
#include <stdbool.h>
#include <stdarg.h>
#include "base.c"
#include "meta_gen.c"
#include "lex.c"
#include "ast.c"
#include "parser.c"
#include "emit_asm_x64.c"
int main() {
lex_init_keywords();
vec_test();
lex_test();
parser_test();
emit_x64_test();
}