com php-langspec: Don't require statement after label: spec/11-statements.md spec/19-grammar.md
| From: | Nikita Popov | Date: | Tue, 19 Sep 2017 06:51:25 +0000 |
| Subject: | com php-langspec: Don't require statement after label: spec/11-statements.md spec/19-grammar.md | ||
| Groups: | php.standards.cvs | ||
| Request: | Send a blank email to standards--cvs+get-391@lists.php.net to get a copy of this message | ||
Commit: e3eb18b757b24b0b1f97dc9bb9a24cf12697eb99
Author: Nikita Popov <nikic@php.net> Tue, 19 Sep 2017 08:51:25 +0200
Parents: 687ecf0dbc2397b79a9b5a39be05105b9f42ac8a
Branches: master
Link: http://git.php.net/?p=php-langspec.git;a=commitdiff;h=e3eb18b757b24b0b1f97dc9bb9a24cf12697eb99
Log:
Don't require statement after label
Fixes #190.
Bugs:
https://bugs.php.net/190
Changed paths:
M spec/11-statements.md
M spec/19-grammar.md
Diff:
diff --git a/spec/11-statements.md b/spec/11-statements.md
index 4a5a0fc..427c74b 100644
--- a/spec/11-statements.md
+++ b/spec/11-statements.md
@@ -98,25 +98,22 @@ while (condition)
<!-- GRAMMAR
named-label-statement:
- name ';' statement
+ name ':'
-->
<pre>
<i id="grammar-named-label-statement">named-label-statement:</i>
- <i><a href="09-lexical-structure.md#grammar-name">name</a></i>
; <i><a href="#grammar-statement">statement</a></i>
+ <i><a href="09-lexical-structure.md#grammar-name">name</a></i>
:
</pre>
**Constraints**
-A named label can be used as the target of a [
goto statement](#the-goto-statement).
-
Named labels must be unique within a function.
**Semantics**
-Any statement may be preceded by a token sequence that declares a name
-as a label name. The presence of a label does not alter the flow of
-execution.
+A named label can be used as the target of a [goto statement](#the-goto-statement).
+The presence of a label does not by itself alter the flow of execution.
## Expression Statements
diff --git a/spec/19-grammar.md b/spec/19-grammar.md
index 7d4738a..32661cb 100644
--- a/spec/19-grammar.md
+++ b/spec/19-grammar.md
@@ -756,7 +756,7 @@ The grammar notation is described in [Grammars section](09-lexical-structure.md#
<i><a href="#grammar-statement-list">statement-list</a></i>
<i><a href="#grammar-statement">statement</a></i>
<i id="grammar-named-label-statement">named-label-statement:</i>
- <i><a href="#grammar-name">name</a></i> ; <i><a
href="#grammar-statement">statement</a></i>
+ <i><a href="#grammar-name">name</a></i> :
<i id="grammar-expression-statement">expression-statement:</i>
<i><a
href="#grammar-expression">expression</a></i><sub>opt</sub> ;