From 57518153147ad53639f16cc940d219dc582c550a Mon Sep 17 00:00:00 2001 From: Aleksey Kladov Date: Mon, 27 Aug 2018 22:03:19 +0300 Subject: Add runnables --- crates/libsyntax2/src/ast/generated.rs | 8 ++++++++ crates/libsyntax2/src/grammar.ron | 6 +++++- 2 files changed, 13 insertions(+), 1 deletion(-) (limited to 'crates/libsyntax2') diff --git a/crates/libsyntax2/src/ast/generated.rs b/crates/libsyntax2/src/ast/generated.rs index 6891e857c..f99d1274a 100644 --- a/crates/libsyntax2/src/ast/generated.rs +++ b/crates/libsyntax2/src/ast/generated.rs @@ -539,6 +539,14 @@ impl<'a> AstNode<'a> for ForExpr<'a> { } impl<'a> ForExpr<'a> { + pub fn pat(self) -> Option> { + super::child_opt(self) + } + + pub fn iterable(self) -> Option> { + super::child_opt(self) + } + pub fn body(self) -> Option> { super::child_opt(self) } diff --git a/crates/libsyntax2/src/grammar.ron b/crates/libsyntax2/src/grammar.ron index c9e128462..a98e9e2fd 100644 --- a/crates/libsyntax2/src/grammar.ron +++ b/crates/libsyntax2/src/grammar.ron @@ -344,7 +344,11 @@ Grammar( options: [ ["body", "Block"] ] ), "ForExpr": ( - options: [ ["body", "Block"] ] + options: [ + ["pat", "Pat"], + ["iterable", "Expr"], + ["body", "Block"] , + ] ), "WhileExpr": ( options: [ -- cgit v1.2.3