annotate runtime/syntax/dylan.vim @ 6602:c77ef1bf9623 v7.4.627

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