Skip to content
This repository was archived by the owner on Dec 1, 2020. It is now read-only.

Commit ca9a285

Browse files
committed
PHP 7 Generator & delegation via yield from
Closes #52 See https://git.io/fjJNd
1 parent 7671a5a commit ca9a285

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

syntax/php.vim

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -791,6 +791,15 @@ syn keyword phpKeyword function contained
791791
\ nextgroup=phpFunction skipwhite skipempty
792792
syn match phpFunction /\h\w*/ contained
793793

794+
" PHP 7 Generator & delegation via yield from
795+
"
796+
" See https://www.php.net/manual/en/language.generators.syntax.php#control-structures.yield
797+
" See https://www.php.net/manual/en/language.generators.syntax.php#control-structures.yield.from
798+
"
799+
syn keyword phpKeyword yield contained
800+
\ nextgroup=phpYieldFromKeyword skipwhite skipempty
801+
syn match phpYieldFromKeyword /\<from\>/ contained
802+
794803
" Clusters
795804
syn cluster phpClConst contains=phpFunctions,phpClasses,phpStaticClasses,phpIdentifier,phpStatement,phpKeyword,phpOperator,phpSplatOperator,phpStringSingle,phpStringDouble,phpBacktick,phpNumber,phpType,phpNullValue,phpBoolean,phpStructure,phpMethodsVar,phpConstants,phpException,phpSuperglobals,phpMagicConstants,phpServerVars
796805
syn cluster phpClInside contains=@phpClConst,phpComment,phpDocComment,phpParent,phpParentError,phpInclude,phpHereDoc,phpNowDoc
@@ -919,6 +928,7 @@ if !exists("did_php_syn_inits")
919928

920929
hi def link phpFCKeyword phpKeyword
921930
hi def link phpSCKeyword phpKeyword
931+
hi def link phpYieldFromKeyword phpKeyword
922932

923933
hi def link phpStaticClasses phpClasses
924934

0 commit comments

Comments
 (0)