aboutsummaryrefslogtreecommitdiff
path: root/crates/ra_syntax
diff options
context:
space:
mode:
Diffstat (limited to 'crates/ra_syntax')
-rw-r--r--crates/ra_syntax/src/ast/generated.rs3
-rw-r--r--crates/ra_syntax/src/grammar.ron2
-rw-r--r--crates/ra_syntax/test_data/parser/inline/ok/0129_marco_pat.txt9
3 files changed, 8 insertions, 6 deletions
diff --git a/crates/ra_syntax/src/ast/generated.rs b/crates/ra_syntax/src/ast/generated.rs
index 9dd6bd3ea..8d65e2e08 100644
--- a/crates/ra_syntax/src/ast/generated.rs
+++ b/crates/ra_syntax/src/ast/generated.rs
@@ -1426,6 +1426,9 @@ impl LambdaExpr {
1426 pub fn param_list(&self) -> Option<ParamList> { 1426 pub fn param_list(&self) -> Option<ParamList> {
1427 AstChildren::new(&self.syntax).next() 1427 AstChildren::new(&self.syntax).next()
1428 } 1428 }
1429 pub fn ret_type(&self) -> Option<RetType> {
1430 AstChildren::new(&self.syntax).next()
1431 }
1429 pub fn body(&self) -> Option<Expr> { 1432 pub fn body(&self) -> Option<Expr> {
1430 AstChildren::new(&self.syntax).next() 1433 AstChildren::new(&self.syntax).next()
1431 } 1434 }
diff --git a/crates/ra_syntax/src/grammar.ron b/crates/ra_syntax/src/grammar.ron
index 9ffa9095b..a228fa9d6 100644
--- a/crates/ra_syntax/src/grammar.ron
+++ b/crates/ra_syntax/src/grammar.ron
@@ -426,7 +426,7 @@ Grammar(
426 "PathExpr": (options: ["Path"]), 426 "PathExpr": (options: ["Path"]),
427 "LambdaExpr": ( 427 "LambdaExpr": (
428 options: [ 428 options: [
429 "ParamList", 429 "ParamList", "RetType",
430 ["body", "Expr"], 430 ["body", "Expr"],
431 ] 431 ]
432 ), 432 ),
diff --git a/crates/ra_syntax/test_data/parser/inline/ok/0129_marco_pat.txt b/crates/ra_syntax/test_data/parser/inline/ok/0129_marco_pat.txt
index 4a714ad6b..b05ccc0ed 100644
--- a/crates/ra_syntax/test_data/parser/inline/ok/0129_marco_pat.txt
+++ b/crates/ra_syntax/test_data/parser/inline/ok/0129_marco_pat.txt
@@ -16,11 +16,10 @@ SOURCE_FILE@[0; 33)
16 LET_KW@[16; 19) "let" 16 LET_KW@[16; 19) "let"
17 WHITESPACE@[19; 20) " " 17 WHITESPACE@[19; 20) " "
18 MACRO_CALL@[20; 25) 18 MACRO_CALL@[20; 25)
19 PATH_PAT@[20; 21) 19 PATH@[20; 21)
20 PATH@[20; 21) 20 PATH_SEGMENT@[20; 21)
21 PATH_SEGMENT@[20; 21) 21 NAME_REF@[20; 21)
22 NAME_REF@[20; 21) 22 IDENT@[20; 21) "m"
23 IDENT@[20; 21) "m"
24 EXCL@[21; 22) "!" 23 EXCL@[21; 22) "!"
25 TOKEN_TREE@[22; 25) 24 TOKEN_TREE@[22; 25)
26 L_PAREN@[22; 23) "(" 25 L_PAREN@[22; 23) "("