annotate runtime/syntax/hastepreproc.vim @ 8638:11c0e9f60519

Added tag v7.4.1608 for changeset ff41ece2e4b81b75368104a667d905c10e68ed2b
author Christian Brabandt <cb@256bit.org>
date Sat, 19 Mar 2016 20:15:05 +0100
parents 0b796e045c42
children 43efa4f5a8ea
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
1668
0b796e045c42 updated for version 7.2b-000
vimboss
parents:
diff changeset
1 " Vim syntax file
0b796e045c42 updated for version 7.2b-000
vimboss
parents:
diff changeset
2 " Language: Haste preprocessor files
0b796e045c42 updated for version 7.2b-000
vimboss
parents:
diff changeset
3 " Maintainer: M. Tranchero - maurizio.tranchero@gmail.com
0b796e045c42 updated for version 7.2b-000
vimboss
parents:
diff changeset
4 " Credits: some parts have been taken from vhdl, verilog, and C syntax
0b796e045c42 updated for version 7.2b-000
vimboss
parents:
diff changeset
5 " files
0b796e045c42 updated for version 7.2b-000
vimboss
parents:
diff changeset
6 " Version: 0.5
0b796e045c42 updated for version 7.2b-000
vimboss
parents:
diff changeset
7
0b796e045c42 updated for version 7.2b-000
vimboss
parents:
diff changeset
8 " HASTE
0b796e045c42 updated for version 7.2b-000
vimboss
parents:
diff changeset
9 if exists("b:current_syntax")
0b796e045c42 updated for version 7.2b-000
vimboss
parents:
diff changeset
10 finish
0b796e045c42 updated for version 7.2b-000
vimboss
parents:
diff changeset
11 endif
0b796e045c42 updated for version 7.2b-000
vimboss
parents:
diff changeset
12 " For version 5.x: Clear all syntax items
0b796e045c42 updated for version 7.2b-000
vimboss
parents:
diff changeset
13 " For version 6.x: Quit when a syntax file was already loaded
0b796e045c42 updated for version 7.2b-000
vimboss
parents:
diff changeset
14 if version < 600
0b796e045c42 updated for version 7.2b-000
vimboss
parents:
diff changeset
15 syntax clear
0b796e045c42 updated for version 7.2b-000
vimboss
parents:
diff changeset
16 elseif exists("b:current_syntax")
0b796e045c42 updated for version 7.2b-000
vimboss
parents:
diff changeset
17 finish
0b796e045c42 updated for version 7.2b-000
vimboss
parents:
diff changeset
18 endif
0b796e045c42 updated for version 7.2b-000
vimboss
parents:
diff changeset
19 " Read the C syntax to start with
0b796e045c42 updated for version 7.2b-000
vimboss
parents:
diff changeset
20 if version < 600
0b796e045c42 updated for version 7.2b-000
vimboss
parents:
diff changeset
21 so <sfile>:p:h/haste.vim
0b796e045c42 updated for version 7.2b-000
vimboss
parents:
diff changeset
22 else
0b796e045c42 updated for version 7.2b-000
vimboss
parents:
diff changeset
23 runtime! syntax/haste.vim
0b796e045c42 updated for version 7.2b-000
vimboss
parents:
diff changeset
24 unlet b:current_syntax
0b796e045c42 updated for version 7.2b-000
vimboss
parents:
diff changeset
25 endif
0b796e045c42 updated for version 7.2b-000
vimboss
parents:
diff changeset
26
0b796e045c42 updated for version 7.2b-000
vimboss
parents:
diff changeset
27 " case is significant
0b796e045c42 updated for version 7.2b-000
vimboss
parents:
diff changeset
28 syn case match
0b796e045c42 updated for version 7.2b-000
vimboss
parents:
diff changeset
29
0b796e045c42 updated for version 7.2b-000
vimboss
parents:
diff changeset
30 " C pre-processor directives
0b796e045c42 updated for version 7.2b-000
vimboss
parents:
diff changeset
31 syn match hastepreprocVar display "\$[[:alnum:]_]*"
0b796e045c42 updated for version 7.2b-000
vimboss
parents:
diff changeset
32 syn region hastepreprocVar start="\${" end="}" contains=hastepreprocVar
0b796e045c42 updated for version 7.2b-000
vimboss
parents:
diff changeset
33 "
0b796e045c42 updated for version 7.2b-000
vimboss
parents:
diff changeset
34 "syn region hastepreproc start="#\[\s*tg[:alnum:]*" end="]#" contains=hastepreprocVar,hastepreproc,hastepreprocError,@Spell
0b796e045c42 updated for version 7.2b-000
vimboss
parents:
diff changeset
35 syn region hastepreproc start="#\[\s*\(\|tgfor\|tgif\)" end="$" contains=hastepreprocVar,hastepreproc,@Spell
0b796e045c42 updated for version 7.2b-000
vimboss
parents:
diff changeset
36 syn region hastepreproc start="}\s\(else\)\s{" end="$" contains=hastepreprocVar,hastepreproc,@Spell
0b796e045c42 updated for version 7.2b-000
vimboss
parents:
diff changeset
37 syn region hastepreproc start="^\s*#\s*\(ifndef\|ifdef\|else\|endif\)\>" end="$" contains=@hastepreprocGroup,@Spell
0b796e045c42 updated for version 7.2b-000
vimboss
parents:
diff changeset
38 syn region hastepreproc start="\s*##\s*\(define\|undef\)\>" end="$" contains=@hastepreprocGroup,@Spell
0b796e045c42 updated for version 7.2b-000
vimboss
parents:
diff changeset
39 syn match hastepreproc "}\{0,1}\s*]#"
0b796e045c42 updated for version 7.2b-000
vimboss
parents:
diff changeset
40
0b796e045c42 updated for version 7.2b-000
vimboss
parents:
diff changeset
41 " Define the default highlighting.
0b796e045c42 updated for version 7.2b-000
vimboss
parents:
diff changeset
42 " Only when an item doesn't have highlighting yet
0b796e045c42 updated for version 7.2b-000
vimboss
parents:
diff changeset
43 hi def link hastepreproc Preproc
0b796e045c42 updated for version 7.2b-000
vimboss
parents:
diff changeset
44 hi def link hastepreprocVar Special
0b796e045c42 updated for version 7.2b-000
vimboss
parents:
diff changeset
45 hi def link hastepreprocError Error
0b796e045c42 updated for version 7.2b-000
vimboss
parents:
diff changeset
46
0b796e045c42 updated for version 7.2b-000
vimboss
parents:
diff changeset
47 let b:current_syntax = "hastepreproc"
0b796e045c42 updated for version 7.2b-000
vimboss
parents:
diff changeset
48
0b796e045c42 updated for version 7.2b-000
vimboss
parents:
diff changeset
49 " vim: ts=8