Now 'vbgame' is included inside this project. Some fixes.
This commit is contained in:
18
error.cpp
Normal file
18
error.cpp
Normal file
@@ -0,0 +1,18 @@
|
||||
#include "error.h"
|
||||
#include <stdio.h>
|
||||
#include "tokenizer.h"
|
||||
|
||||
static char errormsg[255];
|
||||
static bool raised = false;
|
||||
|
||||
|
||||
void error_raise(const char* msg) {
|
||||
raised = true;
|
||||
sprintf(errormsg, "ERROR: %s at %d:%d.", msg, tkn_get_line()+1, tkn_get_row()+1);
|
||||
}
|
||||
|
||||
bool error_raised() { return raised; }
|
||||
|
||||
void error_print() {
|
||||
printf("%s", errormsg);
|
||||
}
|
||||
Reference in New Issue
Block a user