diff options
Diffstat (limited to 'bitbake/contrib/vim/syntax')
-rw-r--r-- | bitbake/contrib/vim/syntax/bitbake.vim | 19 |
1 files changed, 12 insertions, 7 deletions
diff --git a/bitbake/contrib/vim/syntax/bitbake.vim b/bitbake/contrib/vim/syntax/bitbake.vim index f964621ae5..8f39b8f951 100644 --- a/bitbake/contrib/vim/syntax/bitbake.vim +++ b/bitbake/contrib/vim/syntax/bitbake.vim | |||
@@ -51,9 +51,9 @@ syn region bbString matchgroup=bbQuote start=+'+ skip=+\\$+ end=+'+ | |||
51 | syn match bbExport "^export" nextgroup=bbIdentifier skipwhite | 51 | syn match bbExport "^export" nextgroup=bbIdentifier skipwhite |
52 | syn keyword bbExportFlag export contained nextgroup=bbIdentifier skipwhite | 52 | syn keyword bbExportFlag export contained nextgroup=bbIdentifier skipwhite |
53 | syn match bbIdentifier "[a-zA-Z0-9\-_\.\/\+]\+" display contained | 53 | syn match bbIdentifier "[a-zA-Z0-9\-_\.\/\+]\+" display contained |
54 | syn match bbVarDeref "${[a-zA-Z0-9\-_\.\/\+]\+}" contained | 54 | syn match bbVarDeref "${[a-zA-Z0-9\-_:\.\/\+]\+}" contained |
55 | syn match bbVarEq "\(:=\|+=\|=+\|\.=\|=\.\|?=\|??=\|=\)" contained nextgroup=bbVarValue | 55 | syn match bbVarEq "\(:=\|+=\|=+\|\.=\|=\.\|?=\|??=\|=\)" contained nextgroup=bbVarValue |
56 | syn match bbVarDef "^\(export\s*\)\?\([a-zA-Z0-9\-_\.\/\+]\+\(_[${}a-zA-Z0-9\-_\.\/\+]\+\)\?\)\s*\(:=\|+=\|=+\|\.=\|=\.\|?=\|??=\|=\)\@=" contains=bbExportFlag,bbIdentifier,bbVarDeref nextgroup=bbVarEq | 56 | syn match bbVarDef "^\(export\s*\)\?\([a-zA-Z0-9\-_\.\/\+][${}a-zA-Z0-9\-_:\.\/\+]*\)\s*\(:=\|+=\|=+\|\.=\|=\.\|?=\|??=\|=\)\@=" contains=bbExportFlag,bbIdentifier,bbOverrideOperator,bbVarDeref nextgroup=bbVarEq |
57 | syn match bbVarValue ".*$" contained contains=bbString,bbVarDeref,bbVarPyValue | 57 | syn match bbVarValue ".*$" contained contains=bbString,bbVarDeref,bbVarPyValue |
58 | syn region bbVarPyValue start=+${@+ skip=+\\$+ end=+}+ contained contains=@python | 58 | syn region bbVarPyValue start=+${@+ skip=+\\$+ end=+}+ contained contains=@python |
59 | 59 | ||
@@ -63,13 +63,14 @@ syn region bbVarFlagFlag matchgroup=bbArrayBrackets start="\[" end="\]\s* | |||
63 | 63 | ||
64 | " Includes and requires | 64 | " Includes and requires |
65 | syn keyword bbInclude inherit include require contained | 65 | syn keyword bbInclude inherit include require contained |
66 | syn match bbIncludeRest ".*$" contained contains=bbString,bbVarDeref | 66 | syn match bbIncludeRest ".*$" contained contains=bbString,bbVarDeref,bbVarPyValue |
67 | syn match bbIncludeLine "^\(inherit\|include\|require\)\s\+" contains=bbInclude nextgroup=bbIncludeRest | 67 | syn match bbIncludeLine "^\(inherit\|include\|require\)\s\+" contains=bbInclude nextgroup=bbIncludeRest |
68 | 68 | ||
69 | " Add taks and similar | 69 | " Add taks and similar |
70 | syn keyword bbStatement addtask deltask addhandler after before EXPORT_FUNCTIONS contained | 70 | syn keyword bbStatement addtask deltask addhandler after before EXPORT_FUNCTIONS contained |
71 | syn match bbStatementRest ".*$" skipwhite contained contains=bbStatement | 71 | syn match bbStatementRest /[^\\]*$/ skipwhite contained contains=bbStatement,bbVarDeref,bbVarPyValue |
72 | syn match bbStatementLine "^\(addtask\|deltask\|addhandler\|after\|before\|EXPORT_FUNCTIONS\)\s\+" contains=bbStatement nextgroup=bbStatementRest | 72 | syn region bbStatementRestCont start=/.*\\$/ end=/^[^\\]*$/ contained contains=bbStatement,bbVarDeref,bbVarPyValue,bbContinue keepend |
73 | syn match bbStatementLine "^\(addtask\|deltask\|addhandler\|after\|before\|EXPORT_FUNCTIONS\)\s\+" contains=bbStatement nextgroup=bbStatementRest,bbStatementRestCont | ||
73 | 74 | ||
74 | " OE Important Functions | 75 | " OE Important Functions |
75 | syn keyword bbOEFunctions do_fetch do_unpack do_patch do_configure do_compile do_stage do_install do_package contained | 76 | syn keyword bbOEFunctions do_fetch do_unpack do_patch do_configure do_compile do_stage do_install do_package contained |
@@ -77,13 +78,15 @@ syn keyword bbOEFunctions do_fetch do_unpack do_patch do_configure do_comp | |||
77 | " Generic Functions | 78 | " Generic Functions |
78 | syn match bbFunction "\h[0-9A-Za-z_\-\.]*" display contained contains=bbOEFunctions | 79 | syn match bbFunction "\h[0-9A-Za-z_\-\.]*" display contained contains=bbOEFunctions |
79 | 80 | ||
81 | syn keyword bbOverrideOperator append prepend remove contained | ||
82 | |||
80 | " BitBake shell metadata | 83 | " BitBake shell metadata |
81 | syn include @shell syntax/sh.vim | 84 | syn include @shell syntax/sh.vim |
82 | if exists("b:current_syntax") | 85 | if exists("b:current_syntax") |
83 | unlet b:current_syntax | 86 | unlet b:current_syntax |
84 | endif | 87 | endif |
85 | syn keyword bbShFakeRootFlag fakeroot contained | 88 | syn keyword bbShFakeRootFlag fakeroot contained |
86 | syn match bbShFuncDef "^\(fakeroot\s*\)\?\([\.0-9A-Za-z_${}\-\.]\+\)\(python\)\@<!\(\s*()\s*\)\({\)\@=" contains=bbShFakeRootFlag,bbFunction,bbVarDeref,bbDelimiter nextgroup=bbShFuncRegion skipwhite | 89 | syn match bbShFuncDef "^\(fakeroot\s*\)\?\([\.0-9A-Za-z_:${}\-\.]\+\)\(python\)\@<!\(\s*()\s*\)\({\)\@=" contains=bbShFakeRootFlag,bbFunction,bbOverrideOperator,bbVarDeref,bbDelimiter nextgroup=bbShFuncRegion skipwhite |
87 | syn region bbShFuncRegion matchgroup=bbDelimiter start="{\s*$" end="^}\s*$" contained contains=@shell | 90 | syn region bbShFuncRegion matchgroup=bbDelimiter start="{\s*$" end="^}\s*$" contained contains=@shell |
88 | 91 | ||
89 | " Python value inside shell functions | 92 | " Python value inside shell functions |
@@ -91,7 +94,7 @@ syn region shDeref start=+${@+ skip=+\\$+ excludenl end=+}+ contained co | |||
91 | 94 | ||
92 | " BitBake python metadata | 95 | " BitBake python metadata |
93 | syn keyword bbPyFlag python contained | 96 | syn keyword bbPyFlag python contained |
94 | syn match bbPyFuncDef "^\(fakeroot\s*\)\?\(python\)\(\s\+[0-9A-Za-z_${}\-\.]\+\)\?\(\s*()\s*\)\({\)\@=" contains=bbShFakeRootFlag,bbPyFlag,bbFunction,bbVarDeref,bbDelimiter nextgroup=bbPyFuncRegion skipwhite | 97 | syn match bbPyFuncDef "^\(fakeroot\s*\)\?\(python\)\(\s\+[0-9A-Za-z_:${}\-\.]\+\)\?\(\s*()\s*\)\({\)\@=" contains=bbShFakeRootFlag,bbPyFlag,bbFunction,bbOverrideOperator,bbVarDeref,bbDelimiter nextgroup=bbPyFuncRegion skipwhite |
95 | syn region bbPyFuncRegion matchgroup=bbDelimiter start="{\s*$" end="^}\s*$" contained contains=@python | 98 | syn region bbPyFuncRegion matchgroup=bbDelimiter start="{\s*$" end="^}\s*$" contained contains=@python |
96 | 99 | ||
97 | " BitBake 'def'd python functions | 100 | " BitBake 'def'd python functions |
@@ -120,7 +123,9 @@ hi def link bbPyFlag Type | |||
120 | hi def link bbPyDef Statement | 123 | hi def link bbPyDef Statement |
121 | hi def link bbStatement Statement | 124 | hi def link bbStatement Statement |
122 | hi def link bbStatementRest Identifier | 125 | hi def link bbStatementRest Identifier |
126 | hi def link bbStatementRestCont Identifier | ||
123 | hi def link bbOEFunctions Special | 127 | hi def link bbOEFunctions Special |
124 | hi def link bbVarPyValue PreProc | 128 | hi def link bbVarPyValue PreProc |
129 | hi def link bbOverrideOperator Operator | ||
125 | 130 | ||
126 | let b:current_syntax = "bb" | 131 | let b:current_syntax = "bb" |