Prefix parsing

This commit is contained in:
2026-05-04 19:58:34 +02:00
parent c083a547d7
commit ba24db481c
4 changed files with 47 additions and 4 deletions
+11 -1
View File
@@ -110,6 +110,16 @@ binary_px = { bin_op ~ expr }
bin_op = { "+" | "-" | "*" | "/" | "%" | "==" | "!=" | "<" | ">" | "<=" | ">=" }
struct_field_decl = { identifier ~ ":" ~ expr }
prefix = {
deref_px
| mut_ref_px
| ref_px
}
deref_px = { "*" }
mut_ref_px = { "&" ~ mutable }
ref_px = { "&" }
expr = {
primary ~ postfix*
prefix* ~ primary ~ postfix*
}