com php-langspec: Function arguments are arbitrary expressions: spec/10-expressions.md spec/19-grammar.md
| From: | Nikita Popov | Date: | Tue, 19 Sep 2017 09:17:00 +0000 |
| Subject: | com php-langspec: Function arguments are arbitrary expressions: spec/10-expressions.md spec/19-grammar.md | ||
| Groups: | php.standards.cvs | ||
| Request: | Send a blank email to standards--cvs+get-401@lists.php.net to get a copy of this message | ||
Commit: 08033b51583acc60a6dadd45053c7c883e6eb933
Author: Nikita Popov <nikic@php.net> Tue, 19 Sep 2017 11:17:00 +0200
Parents: 140cc0b4ff9b79da138e0ae547556d600cf49b13
Branches: master
Link: http://git.php.net/?p=php-langspec.git;a=commitdiff;h=08033b51583acc60a6dadd45053c7c883e6eb933
Log:
Function arguments are arbitrary expressions
Changed paths:
M spec/10-expressions.md
M spec/19-grammar.md
Diff:
diff --git a/spec/10-expressions.md b/spec/10-expressions.md
index 6176ba6..39c909e 100644
--- a/spec/10-expressions.md
+++ b/spec/10-expressions.md
@@ -1309,10 +1309,10 @@ argument-expression-list:
argument-expression:
variadic-unpacking
- assignment-expression
+ expression
variadic-unpacking:
- '...' assignment-expression
+ '...' expression
-->
<pre>
@@ -1326,10 +1326,10 @@ variadic-unpacking:
<i id="grammar-argument-expression">argument-expression:</i>
<i><a
href="#grammar-variadic-unpacking">variadic-unpacking</a></i>
- <i><a
href="#grammar-assignment-expression">assignment-expression</a></i>
+ <i><a href="#grammar-expression">expression</a></i>
<i id="grammar-variadic-unpacking">variadic-unpacking:</i>
- ... <i><a
href="#grammar-assignment-expression">assignment-expression</a></i>
+ ... <i><a href="#grammar-expression">expression</a></i>
</pre>
**Constraints**
@@ -1358,7 +1358,7 @@ call*. The expression designates the *called function*, and
*argument-expression-list* specifies the arguments to be passed to that
function. An argument can be any value. In a function call,
*callable-expression* is evaluated first, followed by each
-*assignment-expression* in the order left-to-right. There is
+*expression* in the order left-to-right. There is
a [sequence point](#general) after each argument is evaluated and right before the function is
called.
For details of the result of a function call see [
return
statement](11-statements.md#the-return-statement).
The value of a function call is a modifiable lvalue only if the function returns a modifiable value
byRef.
diff --git a/spec/19-grammar.md b/spec/19-grammar.md
index 3aeb971..249f65d 100644
--- a/spec/19-grammar.md
+++ b/spec/19-grammar.md
@@ -515,10 +515,10 @@ The grammar notation is described in [Grammars
section](09-lexical-structure.md#
<i id="grammar-argument-expression">argument-expression:</i>
<i><a
href="#grammar-variadic-unpacking">variadic-unpacking</a></i>
- <i><a
href="#grammar-assignment-expression">assignment-expression</a></i>
+ <i><a href="#grammar-expression">expression</a></i>
<i id="grammar-variadic-unpacking">variadic-unpacking:</i>
- ... <i><a
href="#grammar-assignment-expression">assignment-expression</a></i>
+ ... <i><a href="#grammar-expression">expression</a></i>
<i id="grammar-member-access-expression">member-access-expression:</i>
<i><a
href="#grammar-dereferencable-expression">dereferencable-expression</a></i>
-> <i><a
href="#grammar-member-name">member-name</a></i>