Added support for object keys

This commit is contained in:
Lorenzo Ruiz
2015-07-03 14:08:42 +02:00
parent 7f04baf7be
commit ed6a363cd7

View File

@@ -174,7 +174,8 @@ syntax match javaScriptFuncArg "\(([^()]*)\)" contains=javaScriptParen
syntax match javaScriptFuncComma /,/ contained
syntax match javaScriptFuncEq /=/ contained
syntax region javaScriptFuncDef start="\<function\>" end="\([^)]*\)" contains=javaScriptFuncKeyword,javaScriptFuncArg keepend
syntax match jsFunctionKey /\<[a-zA-Z_$][0-9a-zA-Z_$]*\>\(\s*:\s*function\s*\)\@=/ contained
syntax match javaScriptObjectKey /\<[a-zA-Z_$][0-9a-zA-Z_$]*\>\(\s*:\)\@=/ contains=jsFunctionKey
syntax match javaScriptFunctionKey /\<[a-zA-Z_$][0-9a-zA-Z_$]*\>\(\s*:\s*function\s*\)\@=/ contained
"}}}
" Braces, Parens, symbols, colons {{{
syntax match javaScriptBraces "[{}\[\]]"