diff options
author | Richard Purdie <rpurdie@linux.intel.com> | 2010-01-20 18:46:02 +0000 |
---|---|---|
committer | Richard Purdie <rpurdie@linux.intel.com> | 2010-01-20 18:46:02 +0000 |
commit | 22c29d8651668195f72e2f6a8e059d625eb511c3 (patch) | |
tree | dd1dd43f0ec47a9964c8a766eb8b3ad75cf51a64 /bitbake/contrib/vim/syntax | |
parent | 1bfd6edef9db9c9175058ae801d1b601e4f15263 (diff) | |
download | openembedded-core-22c29d8651668195f72e2f6a8e059d625eb511c3.tar.gz openembedded-core-22c29d8651668195f72e2f6a8e059d625eb511c3.tar.bz2 openembedded-core-22c29d8651668195f72e2f6a8e059d625eb511c3.zip |
bitbake: Switch to bitbake-dev version (bitbake master upstream)
Signed-off-by: Richard Purdie <rpurdie@linux.intel.com>
Diffstat (limited to 'bitbake/contrib/vim/syntax')
-rw-r--r-- | bitbake/contrib/vim/syntax/bitbake.vim | 35 |
1 files changed, 21 insertions, 14 deletions
diff --git a/bitbake/contrib/vim/syntax/bitbake.vim b/bitbake/contrib/vim/syntax/bitbake.vim index 43a1990b0b..be55980b3a 100644 --- a/bitbake/contrib/vim/syntax/bitbake.vim +++ b/bitbake/contrib/vim/syntax/bitbake.vim @@ -16,12 +16,17 @@ endif syn case match - " Catch incorrect syntax (only matches if nothing else does) " syn match bbUnmatched "." +syn include @python syntax/python.vim +if exists("b:current_syntax") + unlet b:current_syntax +endif + + " Other syn match bbComment "^#.*$" display contains=bbTodo @@ -34,21 +39,25 @@ syn match bbArrayBrackets "[\[\]]" contained " BitBake strings syn match bbContinue "\\$" -syn region bbString matchgroup=bbQuote start=/"/ skip=/\\$/ excludenl end=/"/ contained keepend contains=bbTodo,bbContinue,bbVarDeref -syn region bbString matchgroup=bbQuote start=/'/ skip=/\\$/ excludenl end=/'/ contained keepend contains=bbTodo,bbContinue,bbVarDeref - +syn region bbString matchgroup=bbQuote start=/"/ skip=/\\$/ excludenl end=/"/ contained keepend contains=bbTodo,bbContinue,bbVarInlinePy,bbVarDeref +syn region bbString matchgroup=bbQuote start=/'/ skip=/\\$/ excludenl end=/'/ contained keepend contains=bbTodo,bbContinue,bbVarInlinePy,bbVarDeref " BitBake variable metadata +syn match bbVarBraces "[\${}]" +syn region bbVarDeref matchgroup=bbVarBraces start="${" end="}" contained +" syn region bbVarDeref start="${" end="}" contained +" syn region bbVarInlinePy start="${@" end="}" contained contains=@python +syn region bbVarInlinePy matchgroup=bbVarBraces start="${@" end="}" contained contains=@python + syn keyword bbExportFlag export contained nextgroup=bbIdentifier skipwhite -syn match bbVarDeref "${[a-zA-Z0-9\-_\.]\+}" contained -syn match bbVarDef "^\(export\s*\)\?\([a-zA-Z0-9\-_\.]\+\(_[${}a-zA-Z0-9\-_\.]\+\)\?\)\s*\(:=\|+=\|=+\|\.=\|=\.\|?=\|=\)\@=" contains=bbExportFlag,bbIdentifier,bbVarDeref nextgroup=bbVarEq +" syn match bbVarDeref "${[a-zA-Z0-9\-_\.]\+}" contained +syn match bbVarDef "^\(export\s*\)\?\([a-zA-Z0-9\-_\.]\+\(_[${}a-zA/-Z0-9\-_\.]\+\)\?\)\s*\(:=\|+=\|=+\|\.=\|=\.\|?=\|=\)\@=" contains=bbExportFlag,bbIdentifier,bbVarDeref nextgroup=bbVarEq -syn match bbIdentifier "[a-zA-Z0-9\-_\.]\+" display contained +syn match bbIdentifier "[a-zA-Z0-9\-_\./]\+" display contained "syn keyword bbVarEq = display contained nextgroup=bbVarValue syn match bbVarEq "\(:=\|+=\|=+\|\.=\|=\.\|?=\|=\)" contained nextgroup=bbVarValue -syn match bbVarValue ".*$" contained contains=bbString,bbVarDeref - +syn match bbVarValue ".*$" contained contains=bbString " BitBake variable metadata flags syn match bbVarFlagDef "^\([a-zA-Z0-9\-_\.]\+\)\(\[[a-zA-Z0-9\-_\.]\+\]\)\@=" contains=bbIdentifier nextgroup=bbVarFlagFlag @@ -61,10 +70,6 @@ syn match bbFunction "\h\w*" display contained " BitBake python metadata -syn include @python syntax/python.vim -if exists("b:current_syntax") - unlet b:current_syntax -endif syn keyword bbPythonFlag python contained nextgroup=bbFunction syn match bbPythonFuncDef "^\(python\s\+\)\(\w\+\)\?\(\s*()\s*\)\({\)\@=" contains=bbPythonFlag,bbFunction,bbDelimiter nextgroup=bbPythonFuncRegion skipwhite @@ -98,7 +103,6 @@ syn match bbStatementRest ".*$" contained contains=bbString,bbVarDeref " hi def link bbArrayBrackets Statement hi def link bbUnmatched Error -hi def link bbVarDeref String hi def link bbContinue Special hi def link bbDef Statement hi def link bbPythonFlag Type @@ -116,5 +120,8 @@ hi def link bbIdentifier Identifier hi def link bbVarEq Operator hi def link bbQuote String hi def link bbVarValue String +" hi def link bbVarInlinePy PreProc +hi def link bbVarDeref PreProc +hi def link bbVarBraces PreProc let b:current_syntax = "bb" |