Skip to content

Commit

Permalink
bug #3832 "yield from" as keyword (SpacePossum)
Browse files Browse the repository at this point in the history
This PR was merged into the 2.12 branch.

Discussion
----------

"yield from" as keyword

Commits
-------

f17ee44 "yield from" as keyword
  • Loading branch information
SpacePossum committed Jul 2, 2018
2 parents 972cb5f + f17ee44 commit 012b1e2
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/Tokenizer/Token.php
Expand Up @@ -318,7 +318,7 @@ public static function getKeywords()
'T_INTERFACE', 'T_ISSET', 'T_LIST', 'T_LOGICAL_AND', 'T_LOGICAL_OR', 'T_LOGICAL_XOR',
'T_NAMESPACE', 'T_NEW', 'T_PRINT', 'T_PRIVATE', 'T_PROTECTED', 'T_PUBLIC', 'T_REQUIRE',
'T_REQUIRE_ONCE', 'T_RETURN', 'T_STATIC', 'T_SWITCH', 'T_THROW', 'T_TRAIT', 'T_TRY',
'T_UNSET', 'T_USE', 'T_VAR', 'T_WHILE', 'T_YIELD',
'T_UNSET', 'T_USE', 'T_VAR', 'T_WHILE', 'T_YIELD', 'T_YIELD_FROM',
]) + [
CT::T_ARRAY_TYPEHINT => CT::T_ARRAY_TYPEHINT,
CT::T_CLASS_CONSTANT => CT::T_CLASS_CONSTANT,
Expand Down
2 changes: 1 addition & 1 deletion tests/Fixtures/Integration/misc/PHP7.test
Expand Up @@ -205,7 +205,7 @@ class Foo implements FooInterface
yield 1;

// generator delegation
yield from $this->gen2();
yield FROM $this->gen2();
}

public function gen2()
Expand Down

0 comments on commit 012b1e2

Please sign in to comment.