🐛 fix out of bound bug

This commit is contained in:
ValKmjolnir
2023-09-06 19:29:59 +08:00
parent ec03f0aee0
commit 298b54c9ec
+4 -1
View File
@@ -189,7 +189,10 @@ bool parse::need_semi_check(expr* node) {
}
void parse::update_location(expr* node) {
node->update_location(toks[ptr].loc);
if (!ptr) {
return;
}
node->update_location(toks[ptr-1].loc);
}
null_expr* parse::null() {