add debug mode and stdin input
This commit is contained in:
@@ -104,6 +104,8 @@ static void print_context_polynom()
|
||||
|
||||
void print_state()
|
||||
{
|
||||
if (!debug_mode)
|
||||
return;
|
||||
ft_dprintf(STDERR_FILENO, "\nSTATE :\n");
|
||||
if (input_g_err)
|
||||
print_context_input();
|
||||
@@ -123,6 +125,7 @@ int stop_errors(e_program_error err, const char *details, ...)
|
||||
// map error codes to messages
|
||||
const char *error_messages[ERROR_SENTINEL] = {
|
||||
[ERROR_BASE] = "undefined error",
|
||||
[ARGUMENTS_ERROR] = "arguments error",
|
||||
[ERROR_UNKNOWN_TOKEN] = "LEXER - unknown token",
|
||||
[ERROR_NUMBER_TOO_BIG] = "LEXER - number is too big",
|
||||
[ERROR_PARSING] = "PARSER - too much terms to parse",
|
||||
|
||||
Reference in New Issue
Block a user