|
Luma 0.1.0
A low-level compiled alternative to C, C++, and more!
|
#include "../c_libs/error/error.h"#include "type.h"#include <stdarg.h>#include <stdio.h>#include <stdlib.h>#include <string.h>
Functions | |
| void | tc_error_init (Token *tokens, int token_count, const char *file_path, ArenaAllocator *arena) |
| Set global context for error reporting Call this once at the start of typechecking. | |
| void | tc_error (AstNode *node, const char *error_type, const char *format,...) |
| Simple error reporting - replaces fprintf(stderr, ...) Usage: tc_error(node, "Type Error", "Variable '%s' not found", var_name);. | |
| void | tc_error_help (AstNode *node, const char *error_type, const char *help, const char *format,...) |
| Error with help message. | |
| void | tc_error_id (AstNode *node, const char *identifier, const char *error_type, const char *format,...) |
| Error with identifier highlighting. | |
Variables | |
| Token * | g_tokens = NULL |
| int | g_token_count = 0 |
| const char * | g_file_path = NULL |
| ArenaAllocator * | g_arena = NULL |
| void tc_error | ( | AstNode * | node, |
| const char * | error_type, | ||
| const char * | format, | ||
| ... | |||
| ) |
Simple error reporting - replaces fprintf(stderr, ...) Usage: tc_error(node, "Type Error", "Variable '%s' not found", var_name);.
| void tc_error_help | ( | AstNode * | node, |
| const char * | error_type, | ||
| const char * | help, | ||
| const char * | format, | ||
| ... | |||
| ) |
Error with help message.
| void tc_error_id | ( | AstNode * | node, |
| const char * | identifier, | ||
| const char * | error_type, | ||
| const char * | format, | ||
| ... | |||
| ) |
Error with identifier highlighting.
| void tc_error_init | ( | Token * | tokens, |
| int | token_count, | ||
| const char * | file_path, | ||
| ArenaAllocator * | arena | ||
| ) |
Set global context for error reporting Call this once at the start of typechecking.
| ArenaAllocator* g_arena = NULL |
| const char* g_file_path = NULL |
| int g_token_count = 0 |
| Token* g_tokens = NULL |