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 | poky-22c29d8651668195f72e2f6a8e059d625eb511c3.tar.gz | |
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 | |||
| 16 | 16 | ||
| 17 | syn case match | 17 | syn case match |
| 18 | 18 | ||
| 19 | |||
| 20 | " Catch incorrect syntax (only matches if nothing else does) | 19 | " Catch incorrect syntax (only matches if nothing else does) |
| 21 | " | 20 | " |
| 22 | syn match bbUnmatched "." | 21 | syn match bbUnmatched "." |
| 23 | 22 | ||
| 24 | 23 | ||
| 24 | syn include @python syntax/python.vim | ||
| 25 | if exists("b:current_syntax") | ||
| 26 | unlet b:current_syntax | ||
| 27 | endif | ||
| 28 | |||
| 29 | |||
| 25 | " Other | 30 | " Other |
| 26 | 31 | ||
| 27 | syn match bbComment "^#.*$" display contains=bbTodo | 32 | syn match bbComment "^#.*$" display contains=bbTodo |
| @@ -34,21 +39,25 @@ syn match bbArrayBrackets "[\[\]]" contained | |||
| 34 | " BitBake strings | 39 | " BitBake strings |
| 35 | 40 | ||
| 36 | syn match bbContinue "\\$" | 41 | syn match bbContinue "\\$" |
| 37 | syn region bbString matchgroup=bbQuote start=/"/ skip=/\\$/ excludenl end=/"/ contained keepend contains=bbTodo,bbContinue,bbVarDeref | 42 | syn region bbString matchgroup=bbQuote start=/"/ skip=/\\$/ excludenl end=/"/ contained keepend contains=bbTodo,bbContinue,bbVarInlinePy,bbVarDeref |
| 38 | syn region bbString matchgroup=bbQuote start=/'/ skip=/\\$/ excludenl end=/'/ contained keepend contains=bbTodo,bbContinue,bbVarDeref | 43 | syn region bbString matchgroup=bbQuote start=/'/ skip=/\\$/ excludenl end=/'/ contained keepend contains=bbTodo,bbContinue,bbVarInlinePy,bbVarDeref |
| 39 | |||
| 40 | 44 | ||
| 41 | " BitBake variable metadata | 45 | " BitBake variable metadata |
| 42 | 46 | ||
| 47 | syn match bbVarBraces "[\${}]" | ||
| 48 | syn region bbVarDeref matchgroup=bbVarBraces start="${" end="}" contained | ||
| 49 | " syn region bbVarDeref start="${" end="}" contained | ||
| 50 | " syn region bbVarInlinePy start="${@" end="}" contained contains=@python | ||
| 51 | syn region bbVarInlinePy matchgroup=bbVarBraces start="${@" end="}" contained contains=@python | ||
| 52 | |||
| 43 | syn keyword bbExportFlag export contained nextgroup=bbIdentifier skipwhite | 53 | syn keyword bbExportFlag export contained nextgroup=bbIdentifier skipwhite |
| 44 | syn match bbVarDeref "${[a-zA-Z0-9\-_\.]\+}" contained | 54 | " syn match bbVarDeref "${[a-zA-Z0-9\-_\.]\+}" contained |
| 45 | syn match bbVarDef "^\(export\s*\)\?\([a-zA-Z0-9\-_\.]\+\(_[${}a-zA-Z0-9\-_\.]\+\)\?\)\s*\(:=\|+=\|=+\|\.=\|=\.\|?=\|=\)\@=" contains=bbExportFlag,bbIdentifier,bbVarDeref nextgroup=bbVarEq | 55 | syn match bbVarDef "^\(export\s*\)\?\([a-zA-Z0-9\-_\.]\+\(_[${}a-zA/-Z0-9\-_\.]\+\)\?\)\s*\(:=\|+=\|=+\|\.=\|=\.\|?=\|=\)\@=" contains=bbExportFlag,bbIdentifier,bbVarDeref nextgroup=bbVarEq |
| 46 | 56 | ||
| 47 | syn match bbIdentifier "[a-zA-Z0-9\-_\.]\+" display contained | 57 | syn match bbIdentifier "[a-zA-Z0-9\-_\./]\+" display contained |
| 48 | "syn keyword bbVarEq = display contained nextgroup=bbVarValue | 58 | "syn keyword bbVarEq = display contained nextgroup=bbVarValue |
| 49 | syn match bbVarEq "\(:=\|+=\|=+\|\.=\|=\.\|?=\|=\)" contained nextgroup=bbVarValue | 59 | syn match bbVarEq "\(:=\|+=\|=+\|\.=\|=\.\|?=\|=\)" contained nextgroup=bbVarValue |
| 50 | syn match bbVarValue ".*$" contained contains=bbString,bbVarDeref | 60 | syn match bbVarValue ".*$" contained contains=bbString |
| 51 | |||
| 52 | 61 | ||
| 53 | " BitBake variable metadata flags | 62 | " BitBake variable metadata flags |
| 54 | syn match bbVarFlagDef "^\([a-zA-Z0-9\-_\.]\+\)\(\[[a-zA-Z0-9\-_\.]\+\]\)\@=" contains=bbIdentifier nextgroup=bbVarFlagFlag | 63 | 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 | |||
| 61 | 70 | ||
| 62 | 71 | ||
| 63 | " BitBake python metadata | 72 | " BitBake python metadata |
| 64 | syn include @python syntax/python.vim | ||
| 65 | if exists("b:current_syntax") | ||
| 66 | unlet b:current_syntax | ||
| 67 | endif | ||
| 68 | 73 | ||
| 69 | syn keyword bbPythonFlag python contained nextgroup=bbFunction | 74 | syn keyword bbPythonFlag python contained nextgroup=bbFunction |
| 70 | syn match bbPythonFuncDef "^\(python\s\+\)\(\w\+\)\?\(\s*()\s*\)\({\)\@=" contains=bbPythonFlag,bbFunction,bbDelimiter nextgroup=bbPythonFuncRegion skipwhite | 75 | 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 | |||
| 98 | " | 103 | " |
| 99 | hi def link bbArrayBrackets Statement | 104 | hi def link bbArrayBrackets Statement |
| 100 | hi def link bbUnmatched Error | 105 | hi def link bbUnmatched Error |
| 101 | hi def link bbVarDeref String | ||
| 102 | hi def link bbContinue Special | 106 | hi def link bbContinue Special |
| 103 | hi def link bbDef Statement | 107 | hi def link bbDef Statement |
| 104 | hi def link bbPythonFlag Type | 108 | hi def link bbPythonFlag Type |
| @@ -116,5 +120,8 @@ hi def link bbIdentifier Identifier | |||
| 116 | hi def link bbVarEq Operator | 120 | hi def link bbVarEq Operator |
| 117 | hi def link bbQuote String | 121 | hi def link bbQuote String |
| 118 | hi def link bbVarValue String | 122 | hi def link bbVarValue String |
| 123 | " hi def link bbVarInlinePy PreProc | ||
| 124 | hi def link bbVarDeref PreProc | ||
| 125 | hi def link bbVarBraces PreProc | ||
| 119 | 126 | ||
| 120 | let b:current_syntax = "bb" | 127 | let b:current_syntax = "bb" |
