From 3f62ab8f510fdac1eeab515c515c437d6dd141e6 Mon Sep 17 00:00:00 2001 From: Ville Penttinen Date: Sun, 24 Mar 2019 19:45:11 +0200 Subject: Add WherePred to allow predicate access in WhereClause This also unifies parsing of WHERE_PRED bounds, now Lifetime bounds will also be parsed using TYPE_BOUND_LIST --- crates/ra_syntax/src/grammar.ron | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-) (limited to 'crates/ra_syntax/src/grammar.ron') diff --git a/crates/ra_syntax/src/grammar.ron b/crates/ra_syntax/src/grammar.ron index 18730a894..1123c2e95 100644 --- a/crates/ra_syntax/src/grammar.ron +++ b/crates/ra_syntax/src/grammar.ron @@ -595,7 +595,20 @@ Grammar( ["bounds", "TypeBound"], ] ), - "WhereClause": (), + "WherePred": ( + options: [ + "TypeRef", + "Lifetime", + ], + traits: [ + "TypeBoundsOwner", + ], + ), + "WhereClause": ( + collections: [ + ["predicates", "WherePred"], + ], + ), "ExprStmt": ( options: [ ["expr", "Expr"] ] ), -- cgit v1.2.3