From 7971457e5898a6ffd8d5c77671a35f31a0fdb886 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Br=C3=A1ulio=20Bezerra?= Date: Fri, 6 Oct 2017 15:41:06 -0300 Subject: [PATCH 1/2] Call expression grammar --- src/expressions/call-expr.md | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/src/expressions/call-expr.md b/src/expressions/call-expr.md index 1e2ad8518..ca8305137 100644 --- a/src/expressions/call-expr.md +++ b/src/expressions/call-expr.md @@ -1,5 +1,12 @@ # Call expressions +> **Syntax** +> _CallExpression_ : +>    [_Expression_] `(` _CallParams_? `)` +> +> _CallParams_ : +>    [_Expression_] ( `,` ([_Expression_]) )\* `,`? + A _call expression_ consists of an expression followed by a parenthesized expression-list. It invokes a function, providing zero or more input variables. If the function eventually returns, then the expression completes. For @@ -87,3 +94,5 @@ fn main() { Refer to [RFC 132] for further details and motivations. [RFC 132]: https://github.com/rust-lang/rfcs/blob/master/text/0132-ufcs.md + +[_Expression_]: expressions.html From 07381a9ec3bf20a5401d57d4779353f1eb4c1a69 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Br=C3=A1ulio=20Bezerra?= Date: Wed, 29 Nov 2017 23:38:49 -0300 Subject: [PATCH 2/2] Remove extraneous parenthesis --- src/expressions/call-expr.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/expressions/call-expr.md b/src/expressions/call-expr.md index ca8305137..fc4777faf 100644 --- a/src/expressions/call-expr.md +++ b/src/expressions/call-expr.md @@ -5,7 +5,7 @@ >    [_Expression_] `(` _CallParams_? `)` > > _CallParams_ : ->    [_Expression_] ( `,` ([_Expression_]) )\* `,`? +>    [_Expression_] ( `,` [_Expression_] )\* `,`? A _call expression_ consists of an expression followed by a parenthesized expression-list. It invokes a function, providing zero or more input variables.