Files
smallprojects/main.c
2026-05-23 15:39:04 +02:00

32 lines
940 B
C

/*
- [ ] 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();
}