Mercurial > vim
annotate runtime/syntax/dylan.vim @ 10048:43efa4f5a8ea
commit https://github.com/vim/vim/commit/89bcfda6834aba724d12554a34b9ed49f5789fd5
Author: Bram Moolenaar <Bram@vim.org>
Date: Tue Aug 30 23:26:57 2016 +0200
Updated runtime files. Remove version checks for Vim older than 6.0.
author | Christian Brabandt <cb@256bit.org> |
---|---|
date | Tue, 30 Aug 2016 23:30:09 +0200 |
parents | 3fc0f57ecb91 |
children | 46763b01cd9a |
rev | line source |
---|---|
7 | 1 " Vim syntax file |
2 " Language: Dylan | |
3 " Authors: Justus Pendleton <justus@acm.org> | |
4 " Brent A. Fulgham <bfulgham@debian.org> | |
5 " Last Change: Fri Sep 29 13:45:55 PDT 2000 | |
6 " | |
7 " This syntax file is based on the Haskell, Perl, Scheme, and C | |
8 " syntax files. | |
9 | |
10 " Part 1: Syntax definition | |
10048
43efa4f5a8ea
commit https://github.com/vim/vim/commit/89bcfda6834aba724d12554a34b9ed49f5789fd5
Christian Brabandt <cb@256bit.org>
parents:
7
diff
changeset
|
11 " quit when a syntax file was already loaded |
43efa4f5a8ea
commit https://github.com/vim/vim/commit/89bcfda6834aba724d12554a34b9ed49f5789fd5
Christian Brabandt <cb@256bit.org>
parents:
7
diff
changeset
|
12 if exists("b:current_syntax") |
7 | 13 finish |
14 endif | |
15 | |
16 syn case ignore | |
17 | |
10048
43efa4f5a8ea
commit https://github.com/vim/vim/commit/89bcfda6834aba724d12554a34b9ed49f5789fd5
Christian Brabandt <cb@256bit.org>
parents:
7
diff
changeset
|
18 setlocal lisp |
7 | 19 |
20 " Highlight special characters (those that have backslashes) differently | |
21 syn match dylanSpecial display contained "\\\(x\x\+\|\o\{1,3}\|.\|$\)" | |
22 | |
23 " Keywords | |
24 syn keyword dylanBlock afterwards begin block cleanup end | |
25 syn keyword dylanClassMods abstract concrete primary inherited virtual | |
26 syn keyword dylanException exception handler signal | |
27 syn keyword dylanParamDefs method class function library macro interface | |
28 syn keyword dylanSimpleDefs constant variable generic primary | |
29 syn keyword dylanOther above below from by in instance local slot subclass then to | |
30 syn keyword dylanConditional if when select case else elseif unless finally otherwise then | |
31 syn keyword dylanRepeat begin for until while from to | |
32 syn keyword dylanStatement define let | |
33 syn keyword dylanImport use import export exclude rename create | |
34 syn keyword dylanMiscMods open sealed domain singleton sideways inline functional | |
35 | |
36 " Matching rules for special forms | |
37 syn match dylanOperator "\s[-!%&\*\+/=\?@\\^|~:]\+[-#!>%&:\*\+/=\?@\\^|~]*" | |
38 syn match dylanOperator "\(\<[A-Z][a-zA-Z0-9_']*\.\)\=:[-!#$%&\*\+./=\?@\\^|~:]*" | |
39 " Numbers | |
40 syn match dylanNumber "\<[0-9]\+\>\|\<0[xX][0-9a-fA-F]\+\>\|\<0[oO][0-7]\+\>" | |
41 syn match dylanNumber "\<[0-9]\+\.[0-9]\+\([eE][-+]\=[0-9]\+\)\=\>" | |
42 " Booleans | |
43 syn match dylanBoolean "#t\|#f" | |
44 " Comments | |
45 syn match dylanComment "//.*" | |
46 syn region dylanComment start="/\*" end="\*/" | |
47 " Strings | |
48 syn region dylanString start=+"+ skip=+\\\\\|\\"+ end=+"+ contains=dySpecial | |
49 syn match dylanCharacter "'[^\\]'" | |
50 " Constants, classes, and variables | |
51 syn match dylanConstant "$\<[a-zA-Z0-9\-]\+\>" | |
52 syn match dylanClass "<\<[a-zA-Z0-9\-]\+\>>" | |
53 syn match dylanVariable "\*\<[a-zA-Z0-9\-]\+\>\*" | |
54 " Preconditions | |
55 syn region dylanPrecondit start="^\s*#\s*\(if\>\|else\>\|endif\>\)" skip="\\$" end="$" | |
56 | |
57 " These appear at the top of files (usually). I like to highlight the whole line | |
58 " so that the definition stands out. They should probably really be keywords, but they | |
59 " don't generally appear in the middle of a line of code. | |
60 syn region dylanHeader start="^[Mm]odule:" end="^$" | |
61 | |
62 " Define the default highlighting. | |
10048
43efa4f5a8ea
commit https://github.com/vim/vim/commit/89bcfda6834aba724d12554a34b9ed49f5789fd5
Christian Brabandt <cb@256bit.org>
parents:
7
diff
changeset
|
63 " Only when an item doesn't have highlighting yet |
43efa4f5a8ea
commit https://github.com/vim/vim/commit/89bcfda6834aba724d12554a34b9ed49f5789fd5
Christian Brabandt <cb@256bit.org>
parents:
7
diff
changeset
|
64 command -nargs=+ HiLink hi def link <args> |
7 | 65 |
10048
43efa4f5a8ea
commit https://github.com/vim/vim/commit/89bcfda6834aba724d12554a34b9ed49f5789fd5
Christian Brabandt <cb@256bit.org>
parents:
7
diff
changeset
|
66 HiLink dylanBlock PreProc |
43efa4f5a8ea
commit https://github.com/vim/vim/commit/89bcfda6834aba724d12554a34b9ed49f5789fd5
Christian Brabandt <cb@256bit.org>
parents:
7
diff
changeset
|
67 HiLink dylanBoolean Boolean |
43efa4f5a8ea
commit https://github.com/vim/vim/commit/89bcfda6834aba724d12554a34b9ed49f5789fd5
Christian Brabandt <cb@256bit.org>
parents:
7
diff
changeset
|
68 HiLink dylanCharacter Character |
43efa4f5a8ea
commit https://github.com/vim/vim/commit/89bcfda6834aba724d12554a34b9ed49f5789fd5
Christian Brabandt <cb@256bit.org>
parents:
7
diff
changeset
|
69 HiLink dylanClass Structure |
43efa4f5a8ea
commit https://github.com/vim/vim/commit/89bcfda6834aba724d12554a34b9ed49f5789fd5
Christian Brabandt <cb@256bit.org>
parents:
7
diff
changeset
|
70 HiLink dylanClassMods StorageClass |
43efa4f5a8ea
commit https://github.com/vim/vim/commit/89bcfda6834aba724d12554a34b9ed49f5789fd5
Christian Brabandt <cb@256bit.org>
parents:
7
diff
changeset
|
71 HiLink dylanComment Comment |
43efa4f5a8ea
commit https://github.com/vim/vim/commit/89bcfda6834aba724d12554a34b9ed49f5789fd5
Christian Brabandt <cb@256bit.org>
parents:
7
diff
changeset
|
72 HiLink dylanConditional Conditional |
43efa4f5a8ea
commit https://github.com/vim/vim/commit/89bcfda6834aba724d12554a34b9ed49f5789fd5
Christian Brabandt <cb@256bit.org>
parents:
7
diff
changeset
|
73 HiLink dylanConstant Constant |
43efa4f5a8ea
commit https://github.com/vim/vim/commit/89bcfda6834aba724d12554a34b9ed49f5789fd5
Christian Brabandt <cb@256bit.org>
parents:
7
diff
changeset
|
74 HiLink dylanException Exception |
43efa4f5a8ea
commit https://github.com/vim/vim/commit/89bcfda6834aba724d12554a34b9ed49f5789fd5
Christian Brabandt <cb@256bit.org>
parents:
7
diff
changeset
|
75 HiLink dylanHeader Macro |
43efa4f5a8ea
commit https://github.com/vim/vim/commit/89bcfda6834aba724d12554a34b9ed49f5789fd5
Christian Brabandt <cb@256bit.org>
parents:
7
diff
changeset
|
76 HiLink dylanImport Include |
43efa4f5a8ea
commit https://github.com/vim/vim/commit/89bcfda6834aba724d12554a34b9ed49f5789fd5
Christian Brabandt <cb@256bit.org>
parents:
7
diff
changeset
|
77 HiLink dylanLabel Label |
43efa4f5a8ea
commit https://github.com/vim/vim/commit/89bcfda6834aba724d12554a34b9ed49f5789fd5
Christian Brabandt <cb@256bit.org>
parents:
7
diff
changeset
|
78 HiLink dylanMiscMods StorageClass |
43efa4f5a8ea
commit https://github.com/vim/vim/commit/89bcfda6834aba724d12554a34b9ed49f5789fd5
Christian Brabandt <cb@256bit.org>
parents:
7
diff
changeset
|
79 HiLink dylanNumber Number |
43efa4f5a8ea
commit https://github.com/vim/vim/commit/89bcfda6834aba724d12554a34b9ed49f5789fd5
Christian Brabandt <cb@256bit.org>
parents:
7
diff
changeset
|
80 HiLink dylanOther Keyword |
43efa4f5a8ea
commit https://github.com/vim/vim/commit/89bcfda6834aba724d12554a34b9ed49f5789fd5
Christian Brabandt <cb@256bit.org>
parents:
7
diff
changeset
|
81 HiLink dylanOperator Operator |
43efa4f5a8ea
commit https://github.com/vim/vim/commit/89bcfda6834aba724d12554a34b9ed49f5789fd5
Christian Brabandt <cb@256bit.org>
parents:
7
diff
changeset
|
82 HiLink dylanParamDefs Keyword |
43efa4f5a8ea
commit https://github.com/vim/vim/commit/89bcfda6834aba724d12554a34b9ed49f5789fd5
Christian Brabandt <cb@256bit.org>
parents:
7
diff
changeset
|
83 HiLink dylanPrecondit PreCondit |
43efa4f5a8ea
commit https://github.com/vim/vim/commit/89bcfda6834aba724d12554a34b9ed49f5789fd5
Christian Brabandt <cb@256bit.org>
parents:
7
diff
changeset
|
84 HiLink dylanRepeat Repeat |
43efa4f5a8ea
commit https://github.com/vim/vim/commit/89bcfda6834aba724d12554a34b9ed49f5789fd5
Christian Brabandt <cb@256bit.org>
parents:
7
diff
changeset
|
85 HiLink dylanSimpleDefs Keyword |
43efa4f5a8ea
commit https://github.com/vim/vim/commit/89bcfda6834aba724d12554a34b9ed49f5789fd5
Christian Brabandt <cb@256bit.org>
parents:
7
diff
changeset
|
86 HiLink dylanStatement Macro |
43efa4f5a8ea
commit https://github.com/vim/vim/commit/89bcfda6834aba724d12554a34b9ed49f5789fd5
Christian Brabandt <cb@256bit.org>
parents:
7
diff
changeset
|
87 HiLink dylanString String |
43efa4f5a8ea
commit https://github.com/vim/vim/commit/89bcfda6834aba724d12554a34b9ed49f5789fd5
Christian Brabandt <cb@256bit.org>
parents:
7
diff
changeset
|
88 HiLink dylanVariable Identifier |
7 | 89 |
10048
43efa4f5a8ea
commit https://github.com/vim/vim/commit/89bcfda6834aba724d12554a34b9ed49f5789fd5
Christian Brabandt <cb@256bit.org>
parents:
7
diff
changeset
|
90 delcommand HiLink |
7 | 91 |
92 let b:current_syntax = "dylan" | |
93 | |
94 " vim:ts=8 |