summaryrefslogtreecommitdiffstats
path: root/syntax/php.vim
diff options
context:
space:
mode:
authorAdam Stankiewicz <sheerun@sher.pl>2015-12-06 11:31:38 +0100
committerAdam Stankiewicz <sheerun@sher.pl>2015-12-06 11:31:38 +0100
commit303b3f1b434f26f936c241789c84dca6e2f50df2 (patch)
tree1507706b422e3ec29c0e5f30bcf14681e04ab374 /syntax/php.vim
parentbf849731731a7da008c891476b878735e8280bdc (diff)
downloadvim-polyglot-303b3f1b434f26f936c241789c84dca6e2f50df2.tar.gz
vim-polyglot-303b3f1b434f26f936c241789c84dca6e2f50df2.zip
Update all bundles
Diffstat (limited to 'syntax/php.vim')
-rw-r--r--syntax/php.vim12
1 files changed, 11 insertions, 1 deletions
diff --git a/syntax/php.vim b/syntax/php.vim
index 42724028..ba396037 100644
--- a/syntax/php.vim
+++ b/syntax/php.vim
@@ -521,7 +521,7 @@ syn keyword phpStatement __construct __destruct __call __callStatic __get __set
syn keyword phpKeyword die exit eval empty isset unset list instanceof insteadof contained
" Include & friends
-syn keyword phpInclude include include_once require require_once namespace use contained
+syn keyword phpInclude include include_once require require_once namespace contained
" Types
syn keyword phpType bool[ean] int[eger] real double float string array object null self parent global this stdClass callable contained
@@ -681,6 +681,16 @@ syntax match phpClassImplements contained
syntax match phpClassDelimiter contained
\ nextgroup=phpClassImplements skipwhite skipempty /,/
+" use statement
+syn keyword phpInclude use contained
+ \ nextgroup=phpUseFunction,phpUseClass skipwhite skipempty
+syn match phpUseFunction /function\_s\+\(\\\|\h\w*\)*\h\w*/ contained contains=phpUseKeyword
+ \ nextgroup=phpUseAlias skipwhite skipempty
+syn match phpUseClass /\(function\_s\+\)\@!\(\\\|\h\w*\)*\h\w*/ contained
+ \ nextgroup=phpUseAlias skipwhite skipempty
+syn match phpUseAlias /as\_s\+\h\w*/ contained contains=phpUseKeyword
+syn match phpUseKeyword /\(function\|as\)\_s\+/ contained contains=phpKeyword
+
" Function name
syn keyword phpKeyword function contained
\ nextgroup=phpFunction skipwhite skipempty