aboutsummaryrefslogtreecommitdiff
path: root/support/vim/syntax
diff options
context:
space:
mode:
authorMike Buland <eichlan@xagasoft.com>2009-12-21 18:04:02 +0000
committerMike Buland <eichlan@xagasoft.com>2009-12-21 18:04:02 +0000
commitfb28f6800864176be2ffca29e8e664b641f33170 (patch)
treeba9180ac442939edc4eacbe1fdae93c5a7f87cee /support/vim/syntax
parent51e21a316be6e052251b3dfc7d671061ebd67cee (diff)
downloadbuild-fb28f6800864176be2ffca29e8e664b641f33170.tar.gz
build-fb28f6800864176be2ffca29e8e664b641f33170.tar.bz2
build-fb28f6800864176be2ffca29e8e664b641f33170.tar.xz
build-fb28f6800864176be2ffca29e8e664b641f33170.zip
m3 is copied into trunk, we should be good to go, now.
Diffstat (limited to 'support/vim/syntax')
-rw-r--r--support/vim/syntax/build.vim70
1 files changed, 70 insertions, 0 deletions
diff --git a/support/vim/syntax/build.vim b/support/vim/syntax/build.vim
new file mode 100644
index 0000000..ae83d94
--- /dev/null
+++ b/support/vim/syntax/build.vim
@@ -0,0 +1,70 @@
1" Vim syntax file
2" Language: Buildscript
3" Maintainer: Mike Buland :)
4" Last Change: 2009 Dec 4
5
6" For version 5.x: Clear all syntax items
7" For version 6.x: Quit when a syntax file was already loaded
8if version < 600
9 syntax clear
10elseif exists("b:current_syntax")
11 finish
12endif
13
14" Keywords
15syn keyword Conditional if then else
16syn keyword Loop for do in
17syn keyword Logic not and or
18syn keyword Statement include set unset function target input condition requires rule profile auto config display type default cache global value return output allow action warning error notice local continue break all export tag
19syn keyword Todo TODO FIXME XXX
20syn keyword Type int string bool float version
21syn keyword Constant null true false file never always important normal hidden autogenerated filetime
22syn keyword Builtins files dirs matches replace regexp execute unlink exists getMakeDeps toString targets fileName dirName
23
24syn match TargetProcess /[a-zA-Z_][a-zA-Z0-9_]*:/he=e-1
25
26syn cluster CommentGroup contains=Todo
27
28syn match Special display contained "\\\(x\x\+\|\o\{1,3}\|.\|$\)"
29syn match Special display contained "\\\(u\x\{4}\|U\x\{8}\)"
30
31" TODO: do we want to end at end of line too?
32syn region doubleString start=+"+ skip=+\\\\\|\\"+ end=+"+ contains=Special,CmdEx
33
34syn region CmdEx start=+$(+ skip=+"\|\\)\|\\\\+ end=+)+
35
36syn case ignore
37syn match Numbers display transparent "\<\d\|\.\d" contains=Number,Float,OctalError,Octal
38syn match Number display contained "\d\+\(u\=l\{0,2}\|ll\=u\)\>"
39" Hex
40syn match Number display contained "0x\x\+\(u\=l\{0,2}\|ll\=u\)\>"
41syn match Octal display contained "0\o\+\(u\=l\{0,2}\|ll\=u\)\>" contains=cOctalZero
42syn match OctalZero display contained "\<0"
43syn match Float display contained "\d\+f"
44syn match Float display contained "\d\+\.\d*\(e[-+]\=\d\+\)\=[fl]\="
45syn match Float display contained "\.\d\+\(e[-+]\=\d\+\)\=[fl]\=\>"
46syn match Float display contained "\d\+e[-+]\=\d\+[fl]\=\>"
47" Flag bad digits in octal
48syn match OctalError display contained "0\o*[89]\d*"
49syn case match
50
51
52syn region cppComment start="#" skip="\\$" end="$" contains=@CommentGroup keepend
53syn region cComment start="/\*" end="\*/" contains=@CommentGroup fold
54syn region cppComment start="//" skip="\\$" end="$" contains=@CommentGroup keepend
55
56
57syntax region Block start="{" end="}" transparent fold
58
59hi def link OctalError Error
60hi def link cComment Comment
61hi def link cppComment Comment
62hi def link singleString String
63hi def link doubleString String
64hi def link cmdEx String
65hi def link Constructor Operator
66hi def link Logic Statement
67hi def link Loop Conditional
68hi def link Builtins Function
69hi def link TargetProcess Type
70