parent
7eac8e6a37
commit
688691b17c
@ -403,8 +403,11 @@ static void printError(Parser* parser, int line, const char* label,
|
|||||||
length += vsprintf(message + length, format, args);
|
length += vsprintf(message + length, format, args);
|
||||||
ASSERT(length < ERROR_MESSAGE_SIZE, "Error should not exceed buffer.");
|
ASSERT(length < ERROR_MESSAGE_SIZE, "Error should not exceed buffer.");
|
||||||
|
|
||||||
|
ObjString* module = parser->module->name;
|
||||||
|
const char* module_name = module ? module->value : "<unknown>";
|
||||||
|
|
||||||
parser->vm->config.errorFn(parser->vm, WREN_ERROR_COMPILE,
|
parser->vm->config.errorFn(parser->vm, WREN_ERROR_COMPILE,
|
||||||
parser->module->name->value, line, message);
|
module_name, line, message);
|
||||||
}
|
}
|
||||||
|
|
||||||
// Outputs a lexical error.
|
// Outputs a lexical error.
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user