Error recovery

This commit is contained in:
2026-05-14 19:07:36 +02:00
parent 23f726fd41
commit ef7ccc5aed
2 changed files with 15 additions and 1 deletions
+9 -1
View File
@@ -52,6 +52,14 @@ visibility = { "pub" ~ ("(" ~ static_path ~ ")")? }
mutable = { "mut" }
var = { "var" }
// ======================================================
// ERROR RECOVERY
// ======================================================
unexpected_statement = {
(!(semicolon | "}" | statement) ~ ANY)+
}
// ======================================================
// GENERICS
// ======================================================
@@ -303,7 +311,7 @@ block = {
}
statement_list = {
statement*
(statement | unexpected_statement)*
}
statement = _{