1
0
mirror of https://github.com/janet-lang/janet synced 2024-11-25 09:47:17 +00:00

Update for issue #62

This commit is contained in:
Calvin Rose 2019-03-07 16:17:18 -05:00
parent 4a2d4f52b5
commit dc9dc98e80
2 changed files with 5 additions and 0 deletions

View File

@ -48,5 +48,7 @@ int system_test() {
assert(janet_equals(janet_cstringv("a string."), janet_cstringv("a string.")));
assert(janet_equals(janet_csymbolv("sym"), janet_csymbolv("sym")));
assert(JANET_NUMBER == janet_type(janet_wrap_number(0.0 / 0.0)));
return 0;
}

View File

@ -552,6 +552,9 @@ void janet_parser_consume(JanetParser *parser, uint8_t c) {
void janet_parser_eof(JanetParser *parser) {
janet_parser_checkdead(parser);
janet_parser_consume(parser, '\n');
if (parser->statecount > 1) {
parser->error = "unexpected end of source";
}
parser->offset--;
parser->flag = 1;
}