#include #include #include "../include/compiler.h" int main() { amal_compiler compiler; int result; const char *filepath; filepath = "tests/main.amal"; result = amal_compiler_init(&compiler); if(result != AMAL_COMPILER_OK) { fprintf(stderr, "Failed to initialize compiler, error code: %d\n", result); return 1; } result = amal_compiler_load_file(&compiler, create_buffer_view(filepath, strlen(filepath))); if(result != AMAL_COMPILER_OK) { fprintf(stderr, "Failed to load file, error code: %d\n", result); return 1; } #ifdef DEBUG return amal_compiler_deinit(&compiler); #endif return 0; }