annotate runtime/syntax/proto.vim @ 18486:9d887cad7315

Added tag v8.1.2237 for changeset 63ee3c2b140fe1b4801389872a8e47aec19d028b
author Bram Moolenaar <Bram@vim.org>
date Thu, 31 Oct 2019 20:00:04 +0100
parents 43efa4f5a8ea
children 8dad79c661d1
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
4869
a5352e73dc00 Update runtime files.
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
1 " syntax file for Protocol Buffers - Google's data interchange format
a5352e73dc00 Update runtime files.
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
2 "
a5352e73dc00 Update runtime files.
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
3 " Copyright 2008 Google Inc. All rights reserved.
a5352e73dc00 Update runtime files.
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
4 "
a5352e73dc00 Update runtime files.
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
5 " Permission is hereby granted, free of charge, to any person obtaining a copy
a5352e73dc00 Update runtime files.
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
6 " of this software and associated documentation files (the "Software"), to deal
a5352e73dc00 Update runtime files.
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
7 " in the Software without restriction, including without limitation the rights
a5352e73dc00 Update runtime files.
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
8 " to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
a5352e73dc00 Update runtime files.
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
9 " copies of the Software, and to permit persons to whom the Software is
a5352e73dc00 Update runtime files.
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
10 " furnished to do so, subject to the following conditions:
a5352e73dc00 Update runtime files.
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
11 "
a5352e73dc00 Update runtime files.
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
12 " The above copyright notice and this permission notice shall be included in
a5352e73dc00 Update runtime files.
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
13 " all copies or substantial portions of the Software.
a5352e73dc00 Update runtime files.
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
14 "
a5352e73dc00 Update runtime files.
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
15 " THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
a5352e73dc00 Update runtime files.
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
16 " IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
a5352e73dc00 Update runtime files.
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
17 " FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
a5352e73dc00 Update runtime files.
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
18 " AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
a5352e73dc00 Update runtime files.
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
19 " LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
a5352e73dc00 Update runtime files.
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
20 " OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
a5352e73dc00 Update runtime files.
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
21 " THE SOFTWARE.
a5352e73dc00 Update runtime files.
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
22 "
a5352e73dc00 Update runtime files.
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
23 " http://code.google.com/p/protobuf/
a5352e73dc00 Update runtime files.
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
24
10048
43efa4f5a8ea commit https://github.com/vim/vim/commit/89bcfda6834aba724d12554a34b9ed49f5789fd5
Christian Brabandt <cb@256bit.org>
parents: 4869
diff changeset
25 " quit when a syntax file was already loaded
43efa4f5a8ea commit https://github.com/vim/vim/commit/89bcfda6834aba724d12554a34b9ed49f5789fd5
Christian Brabandt <cb@256bit.org>
parents: 4869
diff changeset
26 if exists("b:current_syntax")
4869
a5352e73dc00 Update runtime files.
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
27 finish
a5352e73dc00 Update runtime files.
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
28 endif
a5352e73dc00 Update runtime files.
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
29
a5352e73dc00 Update runtime files.
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
30 syn case match
a5352e73dc00 Update runtime files.
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
31
a5352e73dc00 Update runtime files.
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
32 syn keyword protoTodo contained TODO FIXME XXX
a5352e73dc00 Update runtime files.
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
33 syn cluster protoCommentGrp contains=protoTodo
a5352e73dc00 Update runtime files.
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
34
a5352e73dc00 Update runtime files.
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
35 syn keyword protoSyntax syntax import option
a5352e73dc00 Update runtime files.
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
36 syn keyword protoStructure package message group
a5352e73dc00 Update runtime files.
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
37 syn keyword protoRepeat optional required repeated
a5352e73dc00 Update runtime files.
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
38 syn keyword protoDefault default
a5352e73dc00 Update runtime files.
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
39 syn keyword protoExtend extend extensions to max
a5352e73dc00 Update runtime files.
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
40 syn keyword protoRPC service rpc returns
a5352e73dc00 Update runtime files.
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
41
a5352e73dc00 Update runtime files.
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
42 syn keyword protoType int32 int64 uint32 uint64 sint32 sint64
a5352e73dc00 Update runtime files.
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
43 syn keyword protoType fixed32 fixed64 sfixed32 sfixed64
a5352e73dc00 Update runtime files.
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
44 syn keyword protoType float double bool string bytes
a5352e73dc00 Update runtime files.
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
45 syn keyword protoTypedef enum
a5352e73dc00 Update runtime files.
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
46 syn keyword protoBool true false
a5352e73dc00 Update runtime files.
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
47
a5352e73dc00 Update runtime files.
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
48 syn match protoInt /-\?\<\d\+\>/
a5352e73dc00 Update runtime files.
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
49 syn match protoInt /\<0[xX]\x+\>/
a5352e73dc00 Update runtime files.
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
50 syn match protoFloat /\<-\?\d*\(\.\d*\)\?/
a5352e73dc00 Update runtime files.
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
51 syn region protoComment start="\/\*" end="\*\/" contains=@protoCommentGrp
a5352e73dc00 Update runtime files.
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
52 syn region protoComment start="//" skip="\\$" end="$" keepend contains=@protoCommentGrp
a5352e73dc00 Update runtime files.
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
53 syn region protoString start=/"/ skip=/\\./ end=/"/
a5352e73dc00 Update runtime files.
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
54 syn region protoString start=/'/ skip=/\\./ end=/'/
a5352e73dc00 Update runtime files.
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
55
a5352e73dc00 Update runtime files.
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
56 hi def link protoTodo Todo
a5352e73dc00 Update runtime files.
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
57
a5352e73dc00 Update runtime files.
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
58 hi def link protoSyntax Include
a5352e73dc00 Update runtime files.
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
59 hi def link protoStructure Structure
a5352e73dc00 Update runtime files.
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
60 hi def link protoRepeat Repeat
a5352e73dc00 Update runtime files.
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
61 hi def link protoDefault Keyword
a5352e73dc00 Update runtime files.
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
62 hi def link protoExtend Keyword
a5352e73dc00 Update runtime files.
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
63 hi def link protoRPC Keyword
a5352e73dc00 Update runtime files.
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
64 hi def link protoType Type
a5352e73dc00 Update runtime files.
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
65 hi def link protoTypedef Typedef
a5352e73dc00 Update runtime files.
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
66 hi def link protoBool Boolean
a5352e73dc00 Update runtime files.
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
67
a5352e73dc00 Update runtime files.
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
68 hi def link protoInt Number
a5352e73dc00 Update runtime files.
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
69 hi def link protoFloat Float
a5352e73dc00 Update runtime files.
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
70 hi def link protoComment Comment
a5352e73dc00 Update runtime files.
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
71 hi def link protoString String
a5352e73dc00 Update runtime files.
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
72
a5352e73dc00 Update runtime files.
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
73 let b:current_syntax = "proto"