From 4fb6b2de51c7296041a4d43caa0a90a8319ceb8e Mon Sep 17 00:00:00 2001 From: Marcin Juszkiewicz Date: Tue, 14 Dec 2004 18:37:07 +0000 Subject: renamed to get less ambiguous name --- contrib/vim/syntax/bb.vim | 120 ----------------------------------------- contrib/vim/syntax/bitbake.vim | 120 +++++++++++++++++++++++++++++++++++++++++ 2 files changed, 120 insertions(+), 120 deletions(-) delete mode 100644 contrib/vim/syntax/bb.vim create mode 100644 contrib/vim/syntax/bitbake.vim (limited to 'contrib') diff --git a/contrib/vim/syntax/bb.vim b/contrib/vim/syntax/bb.vim deleted file mode 100644 index 5d2bc633e..000000000 --- a/contrib/vim/syntax/bb.vim +++ /dev/null @@ -1,120 +0,0 @@ -" Vim syntax file -" -" Copyright (C) 2004 Chris Larson -" This file is licensed under the MIT license, see COPYING.MIT in -" this source distribution for the terms. -" -" Language: BitBake -" Maintainer: Chris Larson -" Filenames: *.bb, *.bbclass - -if version < 600 - syntax clear -elseif exists("b:current_syntax") - finish -endif - -syn case match - - -" Catch incorrect syntax (only matches if nothing else does) -" -syn match bbUnmatched "." - - -" Other - -syn match bbComment "^#.*$" display contains=bbTodo -syn keyword bbTodo TODO FIXME XXX contained -syn match bbDelimiter "[(){}=]" contained -syn match bbQuote /['"]/ contained -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 - - -" BitBake variable metadata - -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 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 - - -" BitBake variable metadata flags -syn match bbVarFlagDef "^\([a-zA-Z0-9\-_\.]\+\)\(\[[a-zA-Z0-9\-_\.]\+\]\)\@=" contains=bbIdentifier nextgroup=bbVarFlagFlag -syn region bbVarFlagFlag matchgroup=bbArrayBrackets start="\[" end="\]\s*\(=\)\@=" keepend excludenl contained contains=bbIdentifier nextgroup=bbVarEq -"syn match bbVarFlagFlag "\[\([a-zA-Z0-9\-_\.]\+\)\]\s*\(=\)\@=" contains=bbIdentifier nextgroup=bbVarEq - - -" Functions! -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 -syn region bbPythonFuncRegion matchgroup=bbDelimiter start="{\s*$" end="^}\s*$" keepend contained contains=@python -"hi def link bbPythonFuncRegion Comment - - -" BitBake shell metadata -syn include @shell syntax/sh.vim -if exists("b:current_syntax") - unlet b:current_syntax -endif - -syn keyword bbFakerootFlag fakeroot contained nextgroup=bbFunction -syn match bbShellFuncDef "^\(fakeroot\s*\)\?\(\w\+\)\(python\)\@ +" This file is licensed under the MIT license, see COPYING.MIT in +" this source distribution for the terms. +" +" Language: BitBake +" Maintainer: Chris Larson +" Filenames: *.bb, *.bbclass + +if version < 600 + syntax clear +elseif exists("b:current_syntax") + finish +endif + +syn case match + + +" Catch incorrect syntax (only matches if nothing else does) +" +syn match bbUnmatched "." + + +" Other + +syn match bbComment "^#.*$" display contains=bbTodo +syn keyword bbTodo TODO FIXME XXX contained +syn match bbDelimiter "[(){}=]" contained +syn match bbQuote /['"]/ contained +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 + + +" BitBake variable metadata + +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 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 + + +" BitBake variable metadata flags +syn match bbVarFlagDef "^\([a-zA-Z0-9\-_\.]\+\)\(\[[a-zA-Z0-9\-_\.]\+\]\)\@=" contains=bbIdentifier nextgroup=bbVarFlagFlag +syn region bbVarFlagFlag matchgroup=bbArrayBrackets start="\[" end="\]\s*\(=\)\@=" keepend excludenl contained contains=bbIdentifier nextgroup=bbVarEq +"syn match bbVarFlagFlag "\[\([a-zA-Z0-9\-_\.]\+\)\]\s*\(=\)\@=" contains=bbIdentifier nextgroup=bbVarEq + + +" Functions! +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 +syn region bbPythonFuncRegion matchgroup=bbDelimiter start="{\s*$" end="^}\s*$" keepend contained contains=@python +"hi def link bbPythonFuncRegion Comment + + +" BitBake shell metadata +syn include @shell syntax/sh.vim +if exists("b:current_syntax") + unlet b:current_syntax +endif + +syn keyword bbFakerootFlag fakeroot contained nextgroup=bbFunction +syn match bbShellFuncDef "^\(fakeroot\s*\)\?\(\w\+\)\(python\)\@