1
0
forked from Mirror/wren

missing semicolon, accessing vm through parser in

This commit is contained in:
Paul VanKeuren
2016-03-15 11:33:37 -05:00
parent 924eaa1f9d
commit 14b7a086ce

View File

@ -387,7 +387,7 @@ static void printError(Parser* parser, int line, const char* label,
if (!parser->printErrors) return;
// Only report errors if there is a WrenErrorFn to handle them.
if (vm->config.errorFn == NULL) return
if (parser->vm->config.errorFn == NULL) return;
// Format the label and message.
char message[ERROR_MESSAGE_SIZE];
@ -395,7 +395,7 @@ static void printError(Parser* parser, int line, const char* label,
length += vsprintf(message + length, format, args);
ASSERT(length < ERROR_MESSAGE_SIZE, "Error should not exceed buffer.");
vm->config.errorFn(parser->module->name->value, line, message);
parser->vm->config.errorFn(parser->module->name->value, line, message);
}
// Outputs a compile or syntax error. This also marks the compilation as having