How did I not catch that earlier... need to _check_, not match, EOL on return statement

This commit is contained in:
K. Lange 2021-01-03 09:15:50 +09:00
parent b676df69da
commit 31751745cd

View File

@ -1109,7 +1109,7 @@ static void forStatement() {
}
static void returnStatement() {
if (match(TOKEN_EOL) || match(TOKEN_EOF)) {
if (check(TOKEN_EOL) || check(TOKEN_EOF)) {
emitReturn();
} else {
if (current->type == TYPE_INIT) {