Skip to content

Commit 4bfc459

Browse files
committed
Support reserved keywords as enum cases
Fixes #807.
1 parent 54f19a0 commit 4bfc459

3 files changed

Lines changed: 343 additions & 329 deletions

File tree

grammar/php7.y

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -688,7 +688,7 @@ class_statement:
688688
{ $$ = Stmt\ClassMethod[$5, ['type' => $2, 'byRef' => $4, 'params' => $7, 'returnType' => $9, 'stmts' => $10, 'attrGroups' => $1]];
689689
$this->checkClassMethod($$, #2); }
690690
| T_USE class_name_list trait_adaptations { $$ = Stmt\TraitUse[$2, $3]; }
691-
| optional_attributes T_CASE identifier enum_case_expr semi
691+
| optional_attributes T_CASE identifier_ex enum_case_expr semi
692692
{ $$ = Stmt\EnumCase[$3, $4, $1]; }
693693
| error { $$ = null; /* will be skipped */ }
694694
;

0 commit comments

Comments
 (0)