Replaced var with let

This commit is contained in:
2026-06-03 17:27:38 +02:00
parent 1608b10af8
commit 9a500c4bcf
2 changed files with 3 additions and 3 deletions
+2 -2
View File
@@ -75,7 +75,7 @@ program = {
visibility = { "pub" ~ ("(" ~ static_path ~ ")")? } visibility = { "pub" ~ ("(" ~ static_path ~ ")")? }
mutable = { "mut" } mutable = { "mut" }
var = { "var" } let_kw = { "let" }
// ====================================================== // ======================================================
// GENERICS // GENERICS
@@ -190,7 +190,7 @@ attributes = {
// DECLARATION HELPERS // DECLARATION HELPERS
// ====================================================== // ======================================================
var_decl = { var_decl = {
(var | type_expr) ~ pattern (let_kw | type_expr) ~ pattern
} }
field = { field = {
+1 -1
View File
@@ -54,7 +54,7 @@ impl<'a> TryFrom<pest::iterators::Pair<'a, Rule>> for VarDecl {
let type_ = inner let type_ = inner
.next() .next()
.and_then(|pair| { .and_then(|pair| {
if pair.as_str().trim() == "var" { if pair.as_rule() == Rule::let_kw {
None None
} else { } else {
Some(TypeExpr::try_from(pair)) Some(TypeExpr::try_from(pair))