mirror of
https://github.com/rust-lang/rust-analyzer.git
synced 2025-09-08 19:40:46 +00:00
Make let statements kind of work
This commit is contained in:
parent
5d60937090
commit
93ffbf80c6
5 changed files with 53 additions and 8 deletions
|
@ -1561,6 +1561,10 @@ impl<'a> LetStmt<'a> {
|
|||
super::child_opt(self)
|
||||
}
|
||||
|
||||
pub fn type_ref(self) -> Option<TypeRef<'a>> {
|
||||
super::child_opt(self)
|
||||
}
|
||||
|
||||
pub fn initializer(self) -> Option<Expr<'a>> {
|
||||
super::child_opt(self)
|
||||
}
|
||||
|
|
|
@ -499,6 +499,7 @@ Grammar(
|
|||
),
|
||||
"LetStmt": ( options: [
|
||||
["pat", "Pat"],
|
||||
["type_ref", "TypeRef"],
|
||||
["initializer", "Expr"],
|
||||
]),
|
||||
"Condition": (
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue