diff options
author | Mike Buland <eichlan@xagasoft.com> | 2009-12-21 18:04:02 +0000 |
---|---|---|
committer | Mike Buland <eichlan@xagasoft.com> | 2009-12-21 18:04:02 +0000 |
commit | fb28f6800864176be2ffca29e8e664b641f33170 (patch) | |
tree | ba9180ac442939edc4eacbe1fdae93c5a7f87cee /support/vim/syntax/build.vim | |
parent | 51e21a316be6e052251b3dfc7d671061ebd67cee (diff) | |
download | build-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 '')
-rw-r--r-- | support/vim/syntax/build.vim | 70 |
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 | ||
8 | if version < 600 | ||
9 | syntax clear | ||
10 | elseif exists("b:current_syntax") | ||
11 | finish | ||
12 | endif | ||
13 | |||
14 | " Keywords | ||
15 | syn keyword Conditional if then else | ||
16 | syn keyword Loop for do in | ||
17 | syn keyword Logic not and or | ||
18 | syn 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 | ||
19 | syn keyword Todo TODO FIXME XXX | ||
20 | syn keyword Type int string bool float version | ||
21 | syn keyword Constant null true false file never always important normal hidden autogenerated filetime | ||
22 | syn keyword Builtins files dirs matches replace regexp execute unlink exists getMakeDeps toString targets fileName dirName | ||
23 | |||
24 | syn match TargetProcess /[a-zA-Z_][a-zA-Z0-9_]*:/he=e-1 | ||
25 | |||
26 | syn cluster CommentGroup contains=Todo | ||
27 | |||
28 | syn match Special display contained "\\\(x\x\+\|\o\{1,3}\|.\|$\)" | ||
29 | syn match Special display contained "\\\(u\x\{4}\|U\x\{8}\)" | ||
30 | |||
31 | " TODO: do we want to end at end of line too? | ||
32 | syn region doubleString start=+"+ skip=+\\\\\|\\"+ end=+"+ contains=Special,CmdEx | ||
33 | |||
34 | syn region CmdEx start=+$(+ skip=+"\|\\)\|\\\\+ end=+)+ | ||
35 | |||
36 | syn case ignore | ||
37 | syn match Numbers display transparent "\<\d\|\.\d" contains=Number,Float,OctalError,Octal | ||
38 | syn match Number display contained "\d\+\(u\=l\{0,2}\|ll\=u\)\>" | ||
39 | " Hex | ||
40 | syn match Number display contained "0x\x\+\(u\=l\{0,2}\|ll\=u\)\>" | ||
41 | syn match Octal display contained "0\o\+\(u\=l\{0,2}\|ll\=u\)\>" contains=cOctalZero | ||
42 | syn match OctalZero display contained "\<0" | ||
43 | syn match Float display contained "\d\+f" | ||
44 | syn match Float display contained "\d\+\.\d*\(e[-+]\=\d\+\)\=[fl]\=" | ||
45 | syn match Float display contained "\.\d\+\(e[-+]\=\d\+\)\=[fl]\=\>" | ||
46 | syn match Float display contained "\d\+e[-+]\=\d\+[fl]\=\>" | ||
47 | " Flag bad digits in octal | ||
48 | syn match OctalError display contained "0\o*[89]\d*" | ||
49 | syn case match | ||
50 | |||
51 | |||
52 | syn region cppComment start="#" skip="\\$" end="$" contains=@CommentGroup keepend | ||
53 | syn region cComment start="/\*" end="\*/" contains=@CommentGroup fold | ||
54 | syn region cppComment start="//" skip="\\$" end="$" contains=@CommentGroup keepend | ||
55 | |||
56 | |||
57 | syntax region Block start="{" end="}" transparent fold | ||
58 | |||
59 | hi def link OctalError Error | ||
60 | hi def link cComment Comment | ||
61 | hi def link cppComment Comment | ||
62 | hi def link singleString String | ||
63 | hi def link doubleString String | ||
64 | hi def link cmdEx String | ||
65 | hi def link Constructor Operator | ||
66 | hi def link Logic Statement | ||
67 | hi def link Loop Conditional | ||
68 | hi def link Builtins Function | ||
69 | hi def link TargetProcess Type | ||
70 | |||