Fixed unsafe

This commit is contained in:
2026-06-10 04:43:36 +02:00
parent afd3d05e2f
commit e3ef968033
5 changed files with 16 additions and 13 deletions
+6 -3
View File
@@ -64,8 +64,6 @@ static_path = {
identifier ~ ("::" ~ identifier)*
}
unsafe_kw = { "unsafe" }
// ======================================================
// PROGRAM
// ======================================================
@@ -345,7 +343,11 @@ top_level = {
// ======================================================
block = {
unsafe_kw? ~ "{" ~ statement_list ~ expr? ~ "}"
"{" ~ statement_list ~ expr? ~ "}"
}
unsafe_block = {
"unsafe" ~ block
}
statement_list = {
@@ -396,6 +398,7 @@ control_flow = {
| match_stmt
| loop_stmt
| block
| unsafe_block
}
statement_branch = { expr ~ block }