Skip to content

Commit 21ccdf6

Browse files
committed
Rebuild scanner, add NEWS/UPGRADING
1 parent 886cbea commit 21ccdf6

File tree

4 files changed

+567
-541
lines changed

4 files changed

+567
-541
lines changed

NEWS

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -77,7 +77,8 @@
7777
. Implemented the RFC `Constructor behaviour of internal classes`. (Dan, Dmitry)
7878
. Implemented the RFC `Fix "foreach" behavior`. (Dmitry)
7979
. Implemented the RFC `Generator Delegation`. (Bob)
80-
. Implemented the RFC ` Anonymous Class Support`. (Joe, Nikita, Dmitry)
80+
. Implemented the RFC `Anonymous Class Support`. (Joe, Nikita, Dmitry)
81+
. Implemented the RFC `Context Sensitive Lexer`. (Marc Almada)
8182
. Fixed bug #69511 (Off-by-one buffer overflow in php_sys_readlink).
8283
(Jan Starke, Anatol)
8384

UPGRADING

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -530,6 +530,8 @@ Other
530530
(RFC: https://wiki.php.net/rfc/combined-comparison-operator)
531531
. Added the yield from operator for delegating Generators like coroutines.
532532
(RFC: https://wiki.php.net/rfc/generator-delegation)
533+
. Reserved keywords can now be used in various new contexts.
534+
(RFC: https://wiki.php.net/rfc/context_sensitive_lexer)
533535

534536
- OpenSSL
535537
. Added "alpn_protocols" SSL context option allowing encrypted client/server

Zend/zend_language_parser.y

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@ static YYSIZE_T zend_yytnamerr(char*, const char*);
5252
%}
5353

5454
%pure_parser
55-
%expect 2
55+
%expect 8 /* 6 because traits */
5656

5757
%code requires {
5858
}
@@ -278,8 +278,8 @@ semi_reserved:
278278
| T_THROW | T_USE | T_INSTEADOF | T_GLOBAL | T_VAR | T_UNSET | T_ISSET | T_EMPTY | T_CONTINUE | T_GOTO
279279
| T_FUNCTION | T_CONST | T_RETURN | T_PRINT | T_YIELD | T_LIST | T_SWITCH | T_ENDSWITCH | T_CASE | T_DEFAULT | T_BREAK
280280
| T_ARRAY | T_CALLABLE | T_EXTENDS | T_IMPLEMENTS | T_NAMESPACE | T_TRAIT | T_INTERFACE
281-
// | T_STATIC | T_ABSTRACT | T_FINAL | T_PRIVATE | T_PROTECTED | T_PUBLIC
282-
// | T_CLASS
281+
| T_STATIC | T_ABSTRACT | T_FINAL | T_PRIVATE | T_PROTECTED | T_PUBLIC
282+
// | T_CLASS
283283
;
284284

285285
identifier:

0 commit comments

Comments
 (0)