#include "compiler.h" #include #include #include bool lexer_debug = false; void print_error(const char* message, Pos pos) { fprintf( stderr, "\x1b[31merror\x1b[0m: %s, on line %d\n", message, pos.line); } int main(void) { char test_program[] = " if a == true { (1) += 2; } "; Parser parser; parser_construct(&parser, test_program, strlen(test_program)); ASTNode* ast = parser_parse_statements(&parser); printf("ast = %d\n", ast->node_type); }