annotate runtime/syntax/slice.vim @ 7724:87f3f9536ecf v7.4.1160

commit https://github.com/vim/vim/commit/bd4593ffb170230504500ddedabad3fad1f31291 Author: Bram Moolenaar <Bram@vim.org> Date: Sat Jan 23 22:51:07 2016 +0100 patch 7.4.1160 Problem: No error for jsondecode('"'). Solution: Give an error message for missing double quote.
author Christian Brabandt <cb@256bit.org>
date Sat, 23 Jan 2016 23:00:06 +0100
parents fa4089df54bc
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: Slice (ZeroC's Specification Language for Ice)
574
25a70b1cd2da updated for version 7.0163
vimboss
parents: 7
diff changeset
3 " Maintainer: Morel Bodin <slice06@nym.hush.com>
25a70b1cd2da updated for version 7.0163
vimboss
parents: 7
diff changeset
4 " Last Change: 2005 Dec 03
7
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
5
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
6 " For version 5.x: Clear all syntax items
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
7 " For version 6.x: Quit when a syntax file was already loaded
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
8 if version < 600
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
9 syntax clear
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
10 elseif exists("b:current_syntax")
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
11 finish
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
12 endif
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
13
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
14 " The Slice keywords
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
15
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
16 syn keyword sliceType bool byte double float int long short string void
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
17 syn keyword sliceQualifier const extends idempotent implements local nonmutating out throws
574
25a70b1cd2da updated for version 7.0163
vimboss
parents: 7
diff changeset
18 syn keyword sliceConstruct class enum exception dictionary interface module LocalObject Object sequence struct
7
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
19 syn keyword sliceQualifier const extends idempotent implements local nonmutating out throws
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
20 syn keyword sliceBoolean false true
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
21
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
22 " Include directives
4229
fa4089df54bc Update runtime files.
Bram Moolenaar <bram@vim.org>
parents: 574
diff changeset
23 syn region sliceIncluded display contained start=+"+ skip=+\\\\\|\\"+ end=+"+
7
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
24 syn match sliceIncluded display contained "<[^>]*>"
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
25 syn match sliceInclude display "^\s*#\s*include\>\s*["<]" contains=sliceIncluded
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
26
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
27 " Double-include guards
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
28 syn region sliceGuard start="^#\(define\|ifndef\|endif\)" end="$"
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
29
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
30 " Strings and characters
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
31 syn region sliceString start=+"+ end=+"+
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
32
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
33 " Numbers (shamelessly ripped from c.vim, only slightly modified)
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
34 "integer number, or floating point number without a dot and with "f".
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
35 syn case ignore
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
36 syn match sliceNumbers display transparent "\<\d\|\.\d" contains=sliceNumber,sliceFloat,sliceOctal
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
37 syn match sliceNumber display contained "\d\+"
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
38 "hex number
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
39 syn match sliceNumber display contained "0x\x\+\(u\=l\{0,2}\|ll\=u\)\>"
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
40 " Flag the first zero of an octal number as something special
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
41 syn match sliceOctal display contained "0\o\+\(u\=l\{0,2}\|ll\=u\)\>" contains=sliceOctalZero
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
42 syn match sliceOctalZero display contained "\<0"
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
43 syn match sliceFloat display contained "\d\+f"
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
44 "floating point number, with dot, optional exponent
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
45 syn match sliceFloat display contained "\d\+\.\d*\(e[-+]\=\d\+\)\=[fl]\="
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
46 "floating point number, starting with a dot, optional exponent
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
47 syn match sliceFloat display contained "\.\d\+\(e[-+]\=\d\+\)\=[fl]\=\>"
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
48 "floating point number, without dot, with exponent
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
49 syn match sliceFloat display contained "\d\+e[-+]\=\d\+[fl]\=\>"
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
50 " flag an octal number with wrong digits
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
51 syn case match
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
52
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
53
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
54 " Comments
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
55 syn region sliceComment start="/\*" end="\*/"
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
56 syn match sliceComment "//.*"
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
57
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
58 syn sync ccomment sliceComment
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
59
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
60 " Define the default highlighting.
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
61 " For version 5.7 and earlier: only when not done already
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
62 " 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
63 if version >= 508 || !exists("did_slice_syn_inits")
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
64 if version < 508
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
65 let did_slice_syn_inits = 1
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
66 command -nargs=+ HiLink hi link <args>
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
67 else
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
68 command -nargs=+ HiLink hi def link <args>
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
69 endif
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
70
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
71 HiLink sliceComment Comment
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
72 HiLink sliceConstruct Keyword
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
73 HiLink sliceType Type
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
74 HiLink sliceString String
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
75 HiLink sliceIncluded String
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
76 HiLink sliceQualifier Keyword
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
77 HiLink sliceInclude Include
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
78 HiLink sliceGuard PreProc
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
79 HiLink sliceBoolean Boolean
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
80 HiLink sliceFloat Number
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
81 HiLink sliceNumber Number
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
82 HiLink sliceOctal Number
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
83 HiLink sliceOctalZero Special
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
84 HiLink sliceNumberError Special
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
85
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
86 delcommand HiLink
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
87 endif
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
88
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
89 let b:current_syntax = "slice"
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
90
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
91 " vim: ts=8