From 15f15d92eb4d6ab791047eefbd6dd9b2baba1140 Mon Sep 17 00:00:00 2001 From: Aleksey Kladov Date: Tue, 28 Aug 2018 23:59:57 +0300 Subject: add impl works with lifetimes --- crates/libsyntax2/src/grammar.ron | 28 +++++++++++++++++++++++++--- 1 file changed, 25 insertions(+), 3 deletions(-) (limited to 'crates/libsyntax2/src/grammar.ron') diff --git a/crates/libsyntax2/src/grammar.ron b/crates/libsyntax2/src/grammar.ron index f1907d1ce..3c293d3e4 100644 --- a/crates/libsyntax2/src/grammar.ron +++ b/crates/libsyntax2/src/grammar.ron @@ -344,7 +344,12 @@ Grammar( "ArrayExpr": (), "ParenExpr": (), "PathExpr": (), - "LambdaExpr": (), + "LambdaExpr": ( + options: [ + ["param_list", "ParamList"], + ["body", "Expr"], + ] + ), "IfExpr": ( options: [ ["condition", "Condition"] ] ), @@ -378,7 +383,12 @@ Grammar( "StructLit": (), "NamedFieldList": (), "NamedField": (), - "CallExpr": (), + "CallExpr": ( + options: [ + [ "expr", "Expr" ], + [ "arg_list", "ArgList" ], + ] + ), "IndexExpr": (), "MethodCallExpr": (), "FieldExpr": (), @@ -457,8 +467,15 @@ Grammar( "NameRef": (), "Attr": ( options: [ ["value", "TokenTree"] ] ), "TokenTree": (), - "TypeParamList": ( collections: [ ["type_params", "TypeParam" ] ]), + "TypeParamList": ( + collections: [ + ["type_params", "TypeParam" ], + ["lifetime_params", "LifetimeParam" ], + ] + ), "TypeParam": ( traits: ["NameOwner"] ), + "LifetimeParam": ( options: [ ["lifetime", "Lifetime"] ] ), + "Lifetime": (), "WhereClause": (), "ExprStmt": ( options: [ ["expr", "Expr"] ] @@ -492,5 +509,10 @@ Grammar( ), "UseItem": (), "ExternCrateItem": (), + "ArgList": ( + collections: [ + ["args", "Expr"] + ] + ) }, ) -- cgit v1.2.3