annotate runtime/syntax/icon.vim @ 31663:2f8a3cde553f v9.0.1164

patch 9.0.1164: evaluating string expression advances function line Commit: https://github.com/vim/vim/commit/01c5f2addf86b8d8940d71c92f6219f14a6df99e Author: h-east <h.east.727@gmail.com> Date: Mon Jan 9 15:10:40 2023 +0000 patch 9.0.1164: evaluating string expression advances function line Problem: Evaluating string expression advances function line. Solution: Disable function lines while parsing a string expression. (Hirohito Higashi, closes #11796)
author Bram Moolenaar <Bram@vim.org>
date Mon, 09 Jan 2023 16:15:03 +0100
parents 1e9e9d89f0ee
children
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
29193
1e9e9d89f0ee Update runtime files
Bram Moolenaar <Bram@vim.org>
parents: 10051
diff changeset
2 " Language: Icon
1e9e9d89f0ee Update runtime files
Bram Moolenaar <Bram@vim.org>
parents: 10051
diff changeset
3 " Maintainer: Doug Kearns <dougkearns@gmail.com>
1e9e9d89f0ee Update runtime files
Bram Moolenaar <Bram@vim.org>
parents: 10051
diff changeset
4 " Previous Maintainer: Wendell Turner <wendell@adsi-m4.com> (invalid last known address)
1e9e9d89f0ee Update runtime files
Bram Moolenaar <Bram@vim.org>
parents: 10051
diff changeset
5 " Last Change: 2022 Jun 16
1e9e9d89f0ee Update runtime files
Bram Moolenaar <Bram@vim.org>
parents: 10051
diff changeset
6 " Contributor: eschen@alumni.princeton.edu 2002.09.18
7
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
7
29193
1e9e9d89f0ee Update runtime files
Bram Moolenaar <Bram@vim.org>
parents: 10051
diff changeset
8 " Prelude {{{1
10048
43efa4f5a8ea commit https://github.com/vim/vim/commit/89bcfda6834aba724d12554a34b9ed49f5789fd5
Christian Brabandt <cb@256bit.org>
parents: 7
diff changeset
9 if exists("b:current_syntax")
7
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
10 finish
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
11 endif
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
12
29193
1e9e9d89f0ee Update runtime files
Bram Moolenaar <Bram@vim.org>
parents: 10051
diff changeset
13 syn iskeyword @,48-57,_,192-255,&
1e9e9d89f0ee Update runtime files
Bram Moolenaar <Bram@vim.org>
parents: 10051
diff changeset
14
1e9e9d89f0ee Update runtime files
Bram Moolenaar <Bram@vim.org>
parents: 10051
diff changeset
15 " Not Top {{{1
1e9e9d89f0ee Update runtime files
Bram Moolenaar <Bram@vim.org>
parents: 10051
diff changeset
16 syn cluster iconNotTop contains=iconDocField,iconIncluded,iconStringSpecial,iconTodo,@Spell
1e9e9d89f0ee Update runtime files
Bram Moolenaar <Bram@vim.org>
parents: 10051
diff changeset
17
1e9e9d89f0ee Update runtime files
Bram Moolenaar <Bram@vim.org>
parents: 10051
diff changeset
18 " Whitespace errors {{{1
1e9e9d89f0ee Update runtime files
Bram Moolenaar <Bram@vim.org>
parents: 10051
diff changeset
19 if exists("icon_space_errors")
1e9e9d89f0ee Update runtime files
Bram Moolenaar <Bram@vim.org>
parents: 10051
diff changeset
20 if !exists("icon_no_trail_space_error")
1e9e9d89f0ee Update runtime files
Bram Moolenaar <Bram@vim.org>
parents: 10051
diff changeset
21 syn match iconSpaceError "\s\+$" display excludenl
1e9e9d89f0ee Update runtime files
Bram Moolenaar <Bram@vim.org>
parents: 10051
diff changeset
22 endif
1e9e9d89f0ee Update runtime files
Bram Moolenaar <Bram@vim.org>
parents: 10051
diff changeset
23 if !exists("icon_no_tab_space_error")
1e9e9d89f0ee Update runtime files
Bram Moolenaar <Bram@vim.org>
parents: 10051
diff changeset
24 syn match iconSpaceError " \+\t"me=e-1 display
1e9e9d89f0ee Update runtime files
Bram Moolenaar <Bram@vim.org>
parents: 10051
diff changeset
25 endif
1e9e9d89f0ee Update runtime files
Bram Moolenaar <Bram@vim.org>
parents: 10051
diff changeset
26 endif
7
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
27
29193
1e9e9d89f0ee Update runtime files
Bram Moolenaar <Bram@vim.org>
parents: 10051
diff changeset
28 " Reserved words {{{1
1e9e9d89f0ee Update runtime files
Bram Moolenaar <Bram@vim.org>
parents: 10051
diff changeset
29 syn keyword iconReserved break by case create default do else every fail if
1e9e9d89f0ee Update runtime files
Bram Moolenaar <Bram@vim.org>
parents: 10051
diff changeset
30 syn keyword iconReserved initial next not of repeat return suspend then to
1e9e9d89f0ee Update runtime files
Bram Moolenaar <Bram@vim.org>
parents: 10051
diff changeset
31 syn keyword iconReserved until while
1e9e9d89f0ee Update runtime files
Bram Moolenaar <Bram@vim.org>
parents: 10051
diff changeset
32
1e9e9d89f0ee Update runtime files
Bram Moolenaar <Bram@vim.org>
parents: 10051
diff changeset
33 syn keyword iconStorageClass global static local record invocable
7
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
34
29193
1e9e9d89f0ee Update runtime files
Bram Moolenaar <Bram@vim.org>
parents: 10051
diff changeset
35 syn keyword iconLink link
7
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
36
29193
1e9e9d89f0ee Update runtime files
Bram Moolenaar <Bram@vim.org>
parents: 10051
diff changeset
37 " Procedure definitions {{{1
1e9e9d89f0ee Update runtime files
Bram Moolenaar <Bram@vim.org>
parents: 10051
diff changeset
38 if exists("icon_no_procedure_fold")
1e9e9d89f0ee Update runtime files
Bram Moolenaar <Bram@vim.org>
parents: 10051
diff changeset
39 syn region iconProcedure matchgroup=iconReserved start="\<procedure\>" end="\<end\>" contains=ALLBUT,@iconNotTop
1e9e9d89f0ee Update runtime files
Bram Moolenaar <Bram@vim.org>
parents: 10051
diff changeset
40 else
1e9e9d89f0ee Update runtime files
Bram Moolenaar <Bram@vim.org>
parents: 10051
diff changeset
41 syn region iconProcedure matchgroup=iconReserved start="\<procedure\>" end="\<end\>" contains=ALLBUT,@iconNotTop fold
7
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
42 endif
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
43
29193
1e9e9d89f0ee Update runtime files
Bram Moolenaar <Bram@vim.org>
parents: 10051
diff changeset
44 " Keywords {{{1
1e9e9d89f0ee Update runtime files
Bram Moolenaar <Bram@vim.org>
parents: 10051
diff changeset
45 syn keyword iconKeyword &allocated &ascii &clock &collections &cset &current
1e9e9d89f0ee Update runtime files
Bram Moolenaar <Bram@vim.org>
parents: 10051
diff changeset
46 syn keyword iconKeyword &date &dateline &digits &dump &e &error &errornumber
1e9e9d89f0ee Update runtime files
Bram Moolenaar <Bram@vim.org>
parents: 10051
diff changeset
47 syn keyword iconKeyword &errortext &errorvalue &errout &fail &features &file
1e9e9d89f0ee Update runtime files
Bram Moolenaar <Bram@vim.org>
parents: 10051
diff changeset
48 syn keyword iconKeyword &host &input &lcase &letters &level &line &main &null
1e9e9d89f0ee Update runtime files
Bram Moolenaar <Bram@vim.org>
parents: 10051
diff changeset
49 syn keyword iconKeyword &output &phi &pi &pos &progname &random &regions
1e9e9d89f0ee Update runtime files
Bram Moolenaar <Bram@vim.org>
parents: 10051
diff changeset
50 syn keyword iconKeyword &source &storage &subject &time &trace &ucase &version
1e9e9d89f0ee Update runtime files
Bram Moolenaar <Bram@vim.org>
parents: 10051
diff changeset
51
1e9e9d89f0ee Update runtime files
Bram Moolenaar <Bram@vim.org>
parents: 10051
diff changeset
52 " Graphics keywords
1e9e9d89f0ee Update runtime files
Bram Moolenaar <Bram@vim.org>
parents: 10051
diff changeset
53 syn keyword iconKeyword &col &control &interval &ldrag &lpress &lrelease
1e9e9d89f0ee Update runtime files
Bram Moolenaar <Bram@vim.org>
parents: 10051
diff changeset
54 syn keyword iconKeyword &mdrag &meta &mpress &mrelease &rdrag &resize &row
1e9e9d89f0ee Update runtime files
Bram Moolenaar <Bram@vim.org>
parents: 10051
diff changeset
55 syn keyword iconKeyword &rpress &rrelease &shift &window &x &y
1e9e9d89f0ee Update runtime files
Bram Moolenaar <Bram@vim.org>
parents: 10051
diff changeset
56
1e9e9d89f0ee Update runtime files
Bram Moolenaar <Bram@vim.org>
parents: 10051
diff changeset
57 " Functions {{{1
1e9e9d89f0ee Update runtime files
Bram Moolenaar <Bram@vim.org>
parents: 10051
diff changeset
58 syn keyword iconFunction abs acos any args asin atan bal callout center char
1e9e9d89f0ee Update runtime files
Bram Moolenaar <Bram@vim.org>
parents: 10051
diff changeset
59 syn keyword iconFunction chdir close collect copy cos cset delay delete detab
1e9e9d89f0ee Update runtime files
Bram Moolenaar <Bram@vim.org>
parents: 10051
diff changeset
60 syn keyword iconFunction display dtor entab errorclear exit exp find flush
1e9e9d89f0ee Update runtime files
Bram Moolenaar <Bram@vim.org>
parents: 10051
diff changeset
61 syn keyword iconFunction function get getch getche getenv iand icom image
1e9e9d89f0ee Update runtime files
Bram Moolenaar <Bram@vim.org>
parents: 10051
diff changeset
62 syn keyword iconFunction insert integer ior ishift ixor kbhit key left list
1e9e9d89f0ee Update runtime files
Bram Moolenaar <Bram@vim.org>
parents: 10051
diff changeset
63 syn keyword iconFunction loadfunc log many map match member move name numeric
1e9e9d89f0ee Update runtime files
Bram Moolenaar <Bram@vim.org>
parents: 10051
diff changeset
64 syn keyword iconFunction open ord pop pos proc pull push put read reads real
1e9e9d89f0ee Update runtime files
Bram Moolenaar <Bram@vim.org>
parents: 10051
diff changeset
65 syn keyword iconFunction remove rename repl reverse right rtod runerr save
1e9e9d89f0ee Update runtime files
Bram Moolenaar <Bram@vim.org>
parents: 10051
diff changeset
66 syn keyword iconFunction seek self seq serial set sin sort sortf sqrt stop
1e9e9d89f0ee Update runtime files
Bram Moolenaar <Bram@vim.org>
parents: 10051
diff changeset
67 syn keyword iconFunction string system tab table tan trim type upto variable
1e9e9d89f0ee Update runtime files
Bram Moolenaar <Bram@vim.org>
parents: 10051
diff changeset
68 syn keyword iconFunction where write writes
7
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
69
29193
1e9e9d89f0ee Update runtime files
Bram Moolenaar <Bram@vim.org>
parents: 10051
diff changeset
70 " Graphics functions
1e9e9d89f0ee Update runtime files
Bram Moolenaar <Bram@vim.org>
parents: 10051
diff changeset
71 syn keyword iconFunction Active Alert Bg CenterString Clip Clone Color
1e9e9d89f0ee Update runtime files
Bram Moolenaar <Bram@vim.org>
parents: 10051
diff changeset
72 syn keyword iconFunction ColorDialog ColorValue CopyArea Couple DrawArc
1e9e9d89f0ee Update runtime files
Bram Moolenaar <Bram@vim.org>
parents: 10051
diff changeset
73 syn keyword iconFunction DrawCircle DrawCurve DrawImage DrawLine DrawPoint
1e9e9d89f0ee Update runtime files
Bram Moolenaar <Bram@vim.org>
parents: 10051
diff changeset
74 syn keyword iconFunction DrawPolygon DrawRectangle DrawSegment DrawString
1e9e9d89f0ee Update runtime files
Bram Moolenaar <Bram@vim.org>
parents: 10051
diff changeset
75 syn keyword iconFunction Enqueue EraseArea Event Fg FillArc FillCircle
1e9e9d89f0ee Update runtime files
Bram Moolenaar <Bram@vim.org>
parents: 10051
diff changeset
76 syn keyword iconFunction FillPolygon FillRectangle Font FreeColor GotoRC
1e9e9d89f0ee Update runtime files
Bram Moolenaar <Bram@vim.org>
parents: 10051
diff changeset
77 syn keyword iconFunction GotoXY LeftString Lower NewColor Notice OpenDialog
1e9e9d89f0ee Update runtime files
Bram Moolenaar <Bram@vim.org>
parents: 10051
diff changeset
78 syn keyword iconFunction PaletteChars PaletteColor PaletteGrays PaletteKey
1e9e9d89f0ee Update runtime files
Bram Moolenaar <Bram@vim.org>
parents: 10051
diff changeset
79 syn keyword iconFunction Pattern Pending Pixel Raise ReadImage RightString
1e9e9d89f0ee Update runtime files
Bram Moolenaar <Bram@vim.org>
parents: 10051
diff changeset
80 syn keyword iconFunction SaveDialog SelectDialog Shade TextDialog TextWidth
1e9e9d89f0ee Update runtime files
Bram Moolenaar <Bram@vim.org>
parents: 10051
diff changeset
81 syn keyword iconFunction ToggleDialog Uncouple WAttrib WClose WDefault WDelay
1e9e9d89f0ee Update runtime files
Bram Moolenaar <Bram@vim.org>
parents: 10051
diff changeset
82 syn keyword iconFunction WDone WFlush WOpen WQuit WRead WReads WriteImage
1e9e9d89f0ee Update runtime files
Bram Moolenaar <Bram@vim.org>
parents: 10051
diff changeset
83 syn keyword iconFunction WSync WWrite WWrites
1e9e9d89f0ee Update runtime files
Bram Moolenaar <Bram@vim.org>
parents: 10051
diff changeset
84
1e9e9d89f0ee Update runtime files
Bram Moolenaar <Bram@vim.org>
parents: 10051
diff changeset
85 " String and character constants {{{1
1e9e9d89f0ee Update runtime files
Bram Moolenaar <Bram@vim.org>
parents: 10051
diff changeset
86 syn match iconStringSpecial "\\x\x\{2}\|\\\o\{3\}\|\\[bdeflnrtv\"\'\\]\|\\^[a-zA-Z0-9]" contained
1e9e9d89f0ee Update runtime files
Bram Moolenaar <Bram@vim.org>
parents: 10051
diff changeset
87 syn match iconStringSpecial "\\$" contained
1e9e9d89f0ee Update runtime files
Bram Moolenaar <Bram@vim.org>
parents: 10051
diff changeset
88 syn match iconStringSpecial "_\ze\s*$" contained
7
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
89
29193
1e9e9d89f0ee Update runtime files
Bram Moolenaar <Bram@vim.org>
parents: 10051
diff changeset
90 syn region iconString start=+"+ skip=+\\\\\|\\"+ end=+"+ contains=iconStringSpecial
1e9e9d89f0ee Update runtime files
Bram Moolenaar <Bram@vim.org>
parents: 10051
diff changeset
91 syn region iconCset start=+'+ skip=+\\\\\|\\'+ end=+'+ contains=iconStringSpecial
7
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
92
29193
1e9e9d89f0ee Update runtime files
Bram Moolenaar <Bram@vim.org>
parents: 10051
diff changeset
93 " Bracket errors {{{1
1e9e9d89f0ee Update runtime files
Bram Moolenaar <Bram@vim.org>
parents: 10051
diff changeset
94
1e9e9d89f0ee Update runtime files
Bram Moolenaar <Bram@vim.org>
parents: 10051
diff changeset
95 if !exists("icon_no_bracket_errors")
1e9e9d89f0ee Update runtime files
Bram Moolenaar <Bram@vim.org>
parents: 10051
diff changeset
96 " catch errors caused by wrong brackets (ACE 2002.09.18)
1e9e9d89f0ee Update runtime files
Bram Moolenaar <Bram@vim.org>
parents: 10051
diff changeset
97 syn cluster iconBracketGroup contains=iconBracketError,iconIncluded
1e9e9d89f0ee Update runtime files
Bram Moolenaar <Bram@vim.org>
parents: 10051
diff changeset
98 syn region iconBracket start='\[' end='\]' contains=ALLBUT,@iconBracketGroup,@iconNotTop transparent
1e9e9d89f0ee Update runtime files
Bram Moolenaar <Bram@vim.org>
parents: 10051
diff changeset
99 syn match iconBracketError "]"
1e9e9d89f0ee Update runtime files
Bram Moolenaar <Bram@vim.org>
parents: 10051
diff changeset
100
1e9e9d89f0ee Update runtime files
Bram Moolenaar <Bram@vim.org>
parents: 10051
diff changeset
101 "catch errors caused by wrong braces (ACE 2002.09.18)
1e9e9d89f0ee Update runtime files
Bram Moolenaar <Bram@vim.org>
parents: 10051
diff changeset
102 syn cluster iconBraceGroup contains=iconBraceError,iconIncluded
1e9e9d89f0ee Update runtime files
Bram Moolenaar <Bram@vim.org>
parents: 10051
diff changeset
103 syn region iconBrace start='{' end='}' contains=ALLBUT,@iconBraceGroup,@iconNotTop transparent
1e9e9d89f0ee Update runtime files
Bram Moolenaar <Bram@vim.org>
parents: 10051
diff changeset
104 syn match iconBraceError "}"
1e9e9d89f0ee Update runtime files
Bram Moolenaar <Bram@vim.org>
parents: 10051
diff changeset
105
1e9e9d89f0ee Update runtime files
Bram Moolenaar <Bram@vim.org>
parents: 10051
diff changeset
106 "catch errors caused by wrong parenthesis
1e9e9d89f0ee Update runtime files
Bram Moolenaar <Bram@vim.org>
parents: 10051
diff changeset
107 syn cluster iconParenGroup contains=iconParenError,iconIncluded
1e9e9d89f0ee Update runtime files
Bram Moolenaar <Bram@vim.org>
parents: 10051
diff changeset
108 syn region iconParen start='(' end=')' contains=ALLBUT,@iconParenGroup,@iconNotTop transparent
1e9e9d89f0ee Update runtime files
Bram Moolenaar <Bram@vim.org>
parents: 10051
diff changeset
109 syn match iconParenError ")"
1e9e9d89f0ee Update runtime files
Bram Moolenaar <Bram@vim.org>
parents: 10051
diff changeset
110 end
1e9e9d89f0ee Update runtime files
Bram Moolenaar <Bram@vim.org>
parents: 10051
diff changeset
111
1e9e9d89f0ee Update runtime files
Bram Moolenaar <Bram@vim.org>
parents: 10051
diff changeset
112 " Numbers {{{1
7
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
113 syn case ignore
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
114
29193
1e9e9d89f0ee Update runtime files
Bram Moolenaar <Bram@vim.org>
parents: 10051
diff changeset
115 " integer
1e9e9d89f0ee Update runtime files
Bram Moolenaar <Bram@vim.org>
parents: 10051
diff changeset
116 syn match iconInteger "\<\d\+\>"
1e9e9d89f0ee Update runtime files
Bram Moolenaar <Bram@vim.org>
parents: 10051
diff changeset
117 syn match iconInteger "\<\d\{1,2}[rR][a-zA-Z0-9]\+\>"
7
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
118
29193
1e9e9d89f0ee Update runtime files
Bram Moolenaar <Bram@vim.org>
parents: 10051
diff changeset
119 " real with trailing dot
1e9e9d89f0ee Update runtime files
Bram Moolenaar <Bram@vim.org>
parents: 10051
diff changeset
120 syn match iconReal "\<\d\+\."
7
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
121
29193
1e9e9d89f0ee Update runtime files
Bram Moolenaar <Bram@vim.org>
parents: 10051
diff changeset
122 " real, with dot, optional exponent
1e9e9d89f0ee Update runtime files
Bram Moolenaar <Bram@vim.org>
parents: 10051
diff changeset
123 syn match iconReal "\<\d\+\.\d*\%(e[-+]\=\d\+\)\=\>"
7
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
124
29193
1e9e9d89f0ee Update runtime files
Bram Moolenaar <Bram@vim.org>
parents: 10051
diff changeset
125 " real, with leading dot, optional exponent
1e9e9d89f0ee Update runtime files
Bram Moolenaar <Bram@vim.org>
parents: 10051
diff changeset
126 syn match iconReal "\.\d\+\%(e[-+]\=\d\+\)\=\>"
7
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
127
29193
1e9e9d89f0ee Update runtime files
Bram Moolenaar <Bram@vim.org>
parents: 10051
diff changeset
128 " real, without dot, with exponent
1e9e9d89f0ee Update runtime files
Bram Moolenaar <Bram@vim.org>
parents: 10051
diff changeset
129 syn match iconReal "\<\d\+e[-+]\=\d\+\>"
7
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
130
29193
1e9e9d89f0ee Update runtime files
Bram Moolenaar <Bram@vim.org>
parents: 10051
diff changeset
131 syn cluster iconNumber contains=iconInteger,iconReal
7
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
132
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
133 syn case match
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
134
29193
1e9e9d89f0ee Update runtime files
Bram Moolenaar <Bram@vim.org>
parents: 10051
diff changeset
135 " Comments {{{1
1e9e9d89f0ee Update runtime files
Bram Moolenaar <Bram@vim.org>
parents: 10051
diff changeset
136 syn keyword iconTodo TODO FIXME XXX BUG contained
1e9e9d89f0ee Update runtime files
Bram Moolenaar <Bram@vim.org>
parents: 10051
diff changeset
137 syn match iconComment "#.*" contains=iconTodo,iconSpaceError,@Spell
1e9e9d89f0ee Update runtime files
Bram Moolenaar <Bram@vim.org>
parents: 10051
diff changeset
138 syn match iconDocField "^#\s\+\zs\%(File\|Subject\|Authors\=\|Date\|Version\|Links\|Requires\|See also\):" contained
7
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
139
29193
1e9e9d89f0ee Update runtime files
Bram Moolenaar <Bram@vim.org>
parents: 10051
diff changeset
140 if exists("icon_no_comment_fold")
1e9e9d89f0ee Update runtime files
Bram Moolenaar <Bram@vim.org>
parents: 10051
diff changeset
141 syn region iconDocumentation start="\%^#\{2,}\%(\n#\+\%(\s\+.*\)\=\)\+" end="^#\+\n\s*$" contains=iconDocField keepend
1e9e9d89f0ee Update runtime files
Bram Moolenaar <Bram@vim.org>
parents: 10051
diff changeset
142 else
1e9e9d89f0ee Update runtime files
Bram Moolenaar <Bram@vim.org>
parents: 10051
diff changeset
143 syn region iconMultilineComment start="^\s*#.*\n\%(^\s*#\)\@=" end="^\s*#.*\n\%(^\s*#\)\@!" contains=iconComment keepend fold transparent
1e9e9d89f0ee Update runtime files
Bram Moolenaar <Bram@vim.org>
parents: 10051
diff changeset
144 syn region iconDocumentation start="\%^#\{2,}\%(\n#\)\+" end="^#\+\n\%([^#]\|$\)" contains=iconDocField keepend fold
1e9e9d89f0ee Update runtime files
Bram Moolenaar <Bram@vim.org>
parents: 10051
diff changeset
145 endif
1e9e9d89f0ee Update runtime files
Bram Moolenaar <Bram@vim.org>
parents: 10051
diff changeset
146
1e9e9d89f0ee Update runtime files
Bram Moolenaar <Bram@vim.org>
parents: 10051
diff changeset
147 " Preprocessor {{{1
1e9e9d89f0ee Update runtime files
Bram Moolenaar <Bram@vim.org>
parents: 10051
diff changeset
148 syn match iconPreInclude '^\s*\zs$\s*include\>\ze\s*"' nextgroup=iconIncluded skipwhite
1e9e9d89f0ee Update runtime files
Bram Moolenaar <Bram@vim.org>
parents: 10051
diff changeset
149 syn match iconIncluded '"[^"]\+"' contained
7
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
150
29193
1e9e9d89f0ee Update runtime files
Bram Moolenaar <Bram@vim.org>
parents: 10051
diff changeset
151 syn region iconPreDefine start="^\s*\zs$\s*\%(define\|undef\)\>" end="$" oneline contains=ALLBUT,@iconPreGroup
1e9e9d89f0ee Update runtime files
Bram Moolenaar <Bram@vim.org>
parents: 10051
diff changeset
152 syn region iconPreProc start="^\s*\zs$\s*\%(error\|line\)\>" end="$" oneline contains=ALLBUT,@iconPreGroup
1e9e9d89f0ee Update runtime files
Bram Moolenaar <Bram@vim.org>
parents: 10051
diff changeset
153 syn region iconPreConditional start="^\s*\zs$\s*\%(if\|ifdef\|ifndef\|elif\|else\|endif\)\>" end="$" oneline contains=iconComment,iconString,iconCset,iconNumber,iconSpaceError
7
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
154
29193
1e9e9d89f0ee Update runtime files
Bram Moolenaar <Bram@vim.org>
parents: 10051
diff changeset
155 syn cluster iconPreGroup contains=iconPreCondit,iconPreInclude,iconIncluded,iconPreDefine
7
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
156
29193
1e9e9d89f0ee Update runtime files
Bram Moolenaar <Bram@vim.org>
parents: 10051
diff changeset
157 syn match iconPreSymbol "_V\d\+"
1e9e9d89f0ee Update runtime files
Bram Moolenaar <Bram@vim.org>
parents: 10051
diff changeset
158 syn keyword iconPreSymbol _ACORN _AMIGA _ARM_FUNCTIONS _ASCII _CALLING
1e9e9d89f0ee Update runtime files
Bram Moolenaar <Bram@vim.org>
parents: 10051
diff changeset
159 syn keyword iconPreSymbol _CO_EXPRESSIONS _COMPILED _DIRECT_EXECUTION
1e9e9d89f0ee Update runtime files
Bram Moolenaar <Bram@vim.org>
parents: 10051
diff changeset
160 syn keyword iconPreSymbol _DOS_FUNCTIONS _EBCDIC _EVENT_MONITOR
1e9e9d89f0ee Update runtime files
Bram Moolenaar <Bram@vim.org>
parents: 10051
diff changeset
161 syn keyword iconPreSymbol _EXECUTABLE_IMAGES _EXTERNAL_FUNCTIONS
1e9e9d89f0ee Update runtime files
Bram Moolenaar <Bram@vim.org>
parents: 10051
diff changeset
162 syn keyword iconPreSymbol _EXTERNAL_VALUES _INTERPRETED _KEYBOARD_FUNCTIONS
1e9e9d89f0ee Update runtime files
Bram Moolenaar <Bram@vim.org>
parents: 10051
diff changeset
163 syn keyword iconPreSymbol _LARGE_INTEGERS _MACINTOSH _MEMORY_MONITOR _MSDOS
1e9e9d89f0ee Update runtime files
Bram Moolenaar <Bram@vim.org>
parents: 10051
diff changeset
164 syn keyword iconPreSymbol _MSDOS_386 _MULTIREGION _MULTITASKING _OS2 _PIPES
1e9e9d89f0ee Update runtime files
Bram Moolenaar <Bram@vim.org>
parents: 10051
diff changeset
165 syn keyword iconPreSymbol _PORT _PRESENTATION_MGR _RECORD_IO _STRING_INVOKE
1e9e9d89f0ee Update runtime files
Bram Moolenaar <Bram@vim.org>
parents: 10051
diff changeset
166 syn keyword iconPreSymbol _SYSTEM_FUNCTION _UNIX _VISUALIZATION _VMS
1e9e9d89f0ee Update runtime files
Bram Moolenaar <Bram@vim.org>
parents: 10051
diff changeset
167 syn keyword iconPreSymbol _WINDOW_FUNCTIONS _X_WINDOW_SYSTEM
7
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
168
29193
1e9e9d89f0ee Update runtime files
Bram Moolenaar <Bram@vim.org>
parents: 10051
diff changeset
169 " Syncing {{{1
7
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
170 if !exists("icon_minlines")
29193
1e9e9d89f0ee Update runtime files
Bram Moolenaar <Bram@vim.org>
parents: 10051
diff changeset
171 let icon_minlines = 250
7
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
172 endif
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
173 exec "syn sync ccomment iconComment minlines=" . icon_minlines
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
174
29193
1e9e9d89f0ee Update runtime files
Bram Moolenaar <Bram@vim.org>
parents: 10051
diff changeset
175 " Default Highlighting {{{1
7
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
176
29193
1e9e9d89f0ee Update runtime files
Bram Moolenaar <Bram@vim.org>
parents: 10051
diff changeset
177 hi def link iconParenError iconError
1e9e9d89f0ee Update runtime files
Bram Moolenaar <Bram@vim.org>
parents: 10051
diff changeset
178 hi def link iconBracketError iconError
1e9e9d89f0ee Update runtime files
Bram Moolenaar <Bram@vim.org>
parents: 10051
diff changeset
179 hi def link iconBraceError iconError
1e9e9d89f0ee Update runtime files
Bram Moolenaar <Bram@vim.org>
parents: 10051
diff changeset
180 hi def link iconSpaceError iconError
1e9e9d89f0ee Update runtime files
Bram Moolenaar <Bram@vim.org>
parents: 10051
diff changeset
181 hi def link iconError Error
1e9e9d89f0ee Update runtime files
Bram Moolenaar <Bram@vim.org>
parents: 10051
diff changeset
182
1e9e9d89f0ee Update runtime files
Bram Moolenaar <Bram@vim.org>
parents: 10051
diff changeset
183 hi def link iconInteger Number
1e9e9d89f0ee Update runtime files
Bram Moolenaar <Bram@vim.org>
parents: 10051
diff changeset
184 hi def link iconReal Float
1e9e9d89f0ee Update runtime files
Bram Moolenaar <Bram@vim.org>
parents: 10051
diff changeset
185 hi def link iconString String
1e9e9d89f0ee Update runtime files
Bram Moolenaar <Bram@vim.org>
parents: 10051
diff changeset
186 hi def link iconCset String
1e9e9d89f0ee Update runtime files
Bram Moolenaar <Bram@vim.org>
parents: 10051
diff changeset
187 hi def link iconStringSpecial SpecialChar
7
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
188
10051
46763b01cd9a commit https://github.com/vim/vim/commit/f37506f60f87d52a9e8850e30067645e2b13783c
Christian Brabandt <cb@256bit.org>
parents: 10048
diff changeset
189 hi def link iconPreProc PreProc
29193
1e9e9d89f0ee Update runtime files
Bram Moolenaar <Bram@vim.org>
parents: 10051
diff changeset
190 hi def link iconIncluded iconString
1e9e9d89f0ee Update runtime files
Bram Moolenaar <Bram@vim.org>
parents: 10051
diff changeset
191 hi def link iconPreInclude Include
1e9e9d89f0ee Update runtime files
Bram Moolenaar <Bram@vim.org>
parents: 10051
diff changeset
192 hi def link iconPreSymbol iconPreProc
1e9e9d89f0ee Update runtime files
Bram Moolenaar <Bram@vim.org>
parents: 10051
diff changeset
193 hi def link iconPreDefine Define
1e9e9d89f0ee Update runtime files
Bram Moolenaar <Bram@vim.org>
parents: 10051
diff changeset
194 hi def link iconPreConditional PreCondit
1e9e9d89f0ee Update runtime files
Bram Moolenaar <Bram@vim.org>
parents: 10051
diff changeset
195
1e9e9d89f0ee Update runtime files
Bram Moolenaar <Bram@vim.org>
parents: 10051
diff changeset
196 hi def link iconStatement Statement
1e9e9d89f0ee Update runtime files
Bram Moolenaar <Bram@vim.org>
parents: 10051
diff changeset
197 hi def link iconStorageClass StorageClass
1e9e9d89f0ee Update runtime files
Bram Moolenaar <Bram@vim.org>
parents: 10051
diff changeset
198 hi def link iconFunction Function
1e9e9d89f0ee Update runtime files
Bram Moolenaar <Bram@vim.org>
parents: 10051
diff changeset
199 hi def link iconReserved Label
1e9e9d89f0ee Update runtime files
Bram Moolenaar <Bram@vim.org>
parents: 10051
diff changeset
200 hi def link iconLink Include
1e9e9d89f0ee Update runtime files
Bram Moolenaar <Bram@vim.org>
parents: 10051
diff changeset
201 hi def link iconKeyword Keyword
1e9e9d89f0ee Update runtime files
Bram Moolenaar <Bram@vim.org>
parents: 10051
diff changeset
202
10051
46763b01cd9a commit https://github.com/vim/vim/commit/f37506f60f87d52a9e8850e30067645e2b13783c
Christian Brabandt <cb@256bit.org>
parents: 10048
diff changeset
203 hi def link iconComment Comment
29193
1e9e9d89f0ee Update runtime files
Bram Moolenaar <Bram@vim.org>
parents: 10051
diff changeset
204 hi def link iconTodo Todo
1e9e9d89f0ee Update runtime files
Bram Moolenaar <Bram@vim.org>
parents: 10051
diff changeset
205 hi def link iconDocField SpecialComment
1e9e9d89f0ee Update runtime files
Bram Moolenaar <Bram@vim.org>
parents: 10051
diff changeset
206 hi def link iconDocumentation Comment
7
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
207
29193
1e9e9d89f0ee Update runtime files
Bram Moolenaar <Bram@vim.org>
parents: 10051
diff changeset
208 " Postscript {{{1
7
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
209 let b:current_syntax = "icon"
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
210
29193
1e9e9d89f0ee Update runtime files
Bram Moolenaar <Bram@vim.org>
parents: 10051
diff changeset
211 " vim: nowrap sw=2 sts=2 ts=8 noet fdm=marker: