Mercurial > vim
annotate runtime/syntax/occam.vim @ 18627:169c810d4e51 v8.1.2306
patch 8.1.2306: double and triple clicks are not tested
Commit: https://github.com/vim/vim/commit/f36a2c7e60d86b1a1733a8f51ed72da9c6f76eb8
Author: Bram Moolenaar <Bram@vim.org>
Date: Sat Nov 16 18:57:16 2019 +0100
patch 8.1.2306: double and triple clicks are not tested
Problem: Double and triple clicks are not tested.
Solution: Test mouse clicks to select text. (closes https://github.com/vim/vim/issues/5226)
author | Bram Moolenaar <Bram@vim.org> |
---|---|
date | Sat, 16 Nov 2019 19:00:05 +0100 |
parents | 46763b01cd9a |
children |
rev | line source |
---|---|
7 | 1 " Vim syntax file |
2 " Language: occam | |
3 " Copyright: Fred Barnes <frmb2@kent.ac.uk>, Mario Schweigler <ms44@kent.ac.uk> | |
4 " Maintainer: Mario Schweigler <ms44@kent.ac.uk> | |
5 " Last Change: 24 May 2003 | |
6 | |
10048
43efa4f5a8ea
commit https://github.com/vim/vim/commit/89bcfda6834aba724d12554a34b9ed49f5789fd5
Christian Brabandt <cb@256bit.org>
parents:
7
diff
changeset
|
7 " 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
|
8 if exists("b:current_syntax") |
7 | 9 finish |
10 endif | |
11 | |
12 "{{{ Settings | |
13 " Set shift width for indent | |
14 setlocal shiftwidth=2 | |
15 " Set the tab key size to two spaces | |
16 setlocal softtabstop=2 | |
17 " Let tab keys always be expanded to spaces | |
18 setlocal expandtab | |
19 | |
20 " Dots are valid in occam identifiers | |
21 setlocal iskeyword+=. | |
22 "}}} | |
23 | |
24 syn case match | |
25 | |
26 syn keyword occamType BYTE BOOL INT INT16 INT32 INT64 REAL32 REAL64 ANY | |
27 syn keyword occamType CHAN DATA OF TYPE TIMER INITIAL VAL PORT MOBILE PLACED | |
28 syn keyword occamType PROCESSOR PACKED RECORD PROTOCOL SHARED ROUND TRUNC | |
29 | |
30 syn keyword occamStructure SEQ PAR IF ALT PRI FORKING PLACE AT | |
31 | |
32 syn keyword occamKeyword PROC IS TRUE FALSE SIZE RECURSIVE REC | |
33 syn keyword occamKeyword RETYPES RESHAPES STEP FROM FOR RESCHEDULE STOP SKIP FORK | |
34 syn keyword occamKeyword FUNCTION VALOF RESULT ELSE CLONE CLAIM | |
35 syn keyword occamBoolean TRUE FALSE | |
36 syn keyword occamRepeat WHILE | |
37 syn keyword occamConditional CASE | |
38 syn keyword occamConstant MOSTNEG MOSTPOS | |
39 | |
40 syn match occamBrackets /\[\|\]/ | |
41 syn match occamParantheses /(\|)/ | |
42 | |
43 syn keyword occamOperator AFTER TIMES MINUS PLUS INITIAL REM AND OR XOR NOT | |
44 syn keyword occamOperator BITAND BITOR BITNOT BYTESIN OFFSETOF | |
45 | |
46 syn match occamOperator /::\|:=\|?\|!/ | |
47 syn match occamOperator /<\|>\|+\|-\|\*\|\/\|\\\|=\|\~/ | |
48 syn match occamOperator /@\|\$\$\|%\|&&\|<&\|&>\|<\]\|\[>\|\^/ | |
49 | |
50 syn match occamSpecialChar /\M**\|*'\|*"\|*#\(\[0-9A-F\]\+\)/ contained | |
51 syn match occamChar /\M\L\='\[^*\]'/ | |
52 syn match occamChar /L'[^']*'/ contains=occamSpecialChar | |
53 | |
54 syn case ignore | |
55 syn match occamTodo /\<todo\>:\=/ contained | |
56 syn match occamNote /\<note\>:\=/ contained | |
57 syn case match | |
58 syn keyword occamNote NOT contained | |
59 | |
60 syn match occamComment /--.*/ contains=occamCommentTitle,occamTodo,occamNote | |
61 syn match occamCommentTitle /--\s*\u\a*\(\s\+\u\a*\)*:/hs=s+2 contained contains=occamTodo,occamNote | |
62 syn match occamCommentTitle /--\s*KROC-LIBRARY\(\.so\|\.a\)\=\s*$/hs=s+2 contained | |
63 syn match occamCommentTitle /--\s*\(KROC-OPTIONS:\|RUN-PARAMETERS:\)/hs=s+2 contained | |
64 | |
65 syn match occamIdentifier /\<[A-Z.][A-Z.0-9]*\>/ | |
66 syn match occamFunction /\<[A-Za-z.][A-Za-z0-9.]*\>/ contained | |
67 | |
68 syn match occamPPIdentifier /##.\{-}\>/ | |
69 | |
70 syn region occamString start=/"/ skip=/\M*"/ end=/"/ contains=occamSpecialChar | |
71 syn region occamCharString start=/'/ end=/'/ contains=occamSpecialChar | |
72 | |
73 syn match occamNumber /\<\d\+\(\.\d\+\(E\(+\|-\)\d\+\)\=\)\=/ | |
74 syn match occamNumber /-\d\+\(\.\d\+\(E\(+\|-\)\d\+\)\=\)\=/ | |
75 syn match occamNumber /#\(\d\|[A-F]\)\+/ | |
76 syn match occamNumber /-#\(\d\|[A-F]\)\+/ | |
77 | |
78 syn keyword occamCDString SHARED EXTERNAL DEFINED NOALIAS NOUSAGE NOT contained | |
79 syn keyword occamCDString FILE LINE PROCESS.PRIORITY OCCAM2.5 contained | |
80 syn keyword occamCDString USER.DEFINED.OPERATORS INITIAL.DECL MOBILES contained | |
81 syn keyword occamCDString BLOCKING.SYSCALLS VERSION NEED.QUAD.ALIGNMENT contained | |
82 syn keyword occamCDString TARGET.CANONICAL TARGET.CPU TARGET.OS TARGET.VENDOR contained | |
83 syn keyword occamCDString TRUE FALSE AND OR contained | |
84 syn match occamCDString /<\|>\|=\|(\|)/ contained | |
85 | |
86 syn region occamCDirective start=/#\(USE\|INCLUDE\|PRAGMA\|DEFINE\|UNDEFINE\|UNDEF\|IF\|ELIF\|ELSE\|ENDIF\|WARNING\|ERROR\|RELAX\)\>/ end=/$/ contains=occamString,occamComment,occamCDString | |
87 | |
88 | |
10051
46763b01cd9a
commit https://github.com/vim/vim/commit/f37506f60f87d52a9e8850e30067645e2b13783c
Christian Brabandt <cb@256bit.org>
parents:
10048
diff
changeset
|
89 hi def link occamType Type |
46763b01cd9a
commit https://github.com/vim/vim/commit/f37506f60f87d52a9e8850e30067645e2b13783c
Christian Brabandt <cb@256bit.org>
parents:
10048
diff
changeset
|
90 hi def link occamKeyword Keyword |
46763b01cd9a
commit https://github.com/vim/vim/commit/f37506f60f87d52a9e8850e30067645e2b13783c
Christian Brabandt <cb@256bit.org>
parents:
10048
diff
changeset
|
91 hi def link occamComment Comment |
46763b01cd9a
commit https://github.com/vim/vim/commit/f37506f60f87d52a9e8850e30067645e2b13783c
Christian Brabandt <cb@256bit.org>
parents:
10048
diff
changeset
|
92 hi def link occamCommentTitle PreProc |
46763b01cd9a
commit https://github.com/vim/vim/commit/f37506f60f87d52a9e8850e30067645e2b13783c
Christian Brabandt <cb@256bit.org>
parents:
10048
diff
changeset
|
93 hi def link occamTodo Todo |
46763b01cd9a
commit https://github.com/vim/vim/commit/f37506f60f87d52a9e8850e30067645e2b13783c
Christian Brabandt <cb@256bit.org>
parents:
10048
diff
changeset
|
94 hi def link occamNote Todo |
46763b01cd9a
commit https://github.com/vim/vim/commit/f37506f60f87d52a9e8850e30067645e2b13783c
Christian Brabandt <cb@256bit.org>
parents:
10048
diff
changeset
|
95 hi def link occamString String |
46763b01cd9a
commit https://github.com/vim/vim/commit/f37506f60f87d52a9e8850e30067645e2b13783c
Christian Brabandt <cb@256bit.org>
parents:
10048
diff
changeset
|
96 hi def link occamCharString String |
46763b01cd9a
commit https://github.com/vim/vim/commit/f37506f60f87d52a9e8850e30067645e2b13783c
Christian Brabandt <cb@256bit.org>
parents:
10048
diff
changeset
|
97 hi def link occamNumber Number |
46763b01cd9a
commit https://github.com/vim/vim/commit/f37506f60f87d52a9e8850e30067645e2b13783c
Christian Brabandt <cb@256bit.org>
parents:
10048
diff
changeset
|
98 hi def link occamCDirective PreProc |
46763b01cd9a
commit https://github.com/vim/vim/commit/f37506f60f87d52a9e8850e30067645e2b13783c
Christian Brabandt <cb@256bit.org>
parents:
10048
diff
changeset
|
99 hi def link occamCDString String |
46763b01cd9a
commit https://github.com/vim/vim/commit/f37506f60f87d52a9e8850e30067645e2b13783c
Christian Brabandt <cb@256bit.org>
parents:
10048
diff
changeset
|
100 hi def link occamPPIdentifier PreProc |
46763b01cd9a
commit https://github.com/vim/vim/commit/f37506f60f87d52a9e8850e30067645e2b13783c
Christian Brabandt <cb@256bit.org>
parents:
10048
diff
changeset
|
101 hi def link occamBoolean Boolean |
46763b01cd9a
commit https://github.com/vim/vim/commit/f37506f60f87d52a9e8850e30067645e2b13783c
Christian Brabandt <cb@256bit.org>
parents:
10048
diff
changeset
|
102 hi def link occamSpecialChar SpecialChar |
46763b01cd9a
commit https://github.com/vim/vim/commit/f37506f60f87d52a9e8850e30067645e2b13783c
Christian Brabandt <cb@256bit.org>
parents:
10048
diff
changeset
|
103 hi def link occamChar Character |
46763b01cd9a
commit https://github.com/vim/vim/commit/f37506f60f87d52a9e8850e30067645e2b13783c
Christian Brabandt <cb@256bit.org>
parents:
10048
diff
changeset
|
104 hi def link occamStructure Structure |
46763b01cd9a
commit https://github.com/vim/vim/commit/f37506f60f87d52a9e8850e30067645e2b13783c
Christian Brabandt <cb@256bit.org>
parents:
10048
diff
changeset
|
105 hi def link occamIdentifier Identifier |
46763b01cd9a
commit https://github.com/vim/vim/commit/f37506f60f87d52a9e8850e30067645e2b13783c
Christian Brabandt <cb@256bit.org>
parents:
10048
diff
changeset
|
106 hi def link occamConstant Constant |
46763b01cd9a
commit https://github.com/vim/vim/commit/f37506f60f87d52a9e8850e30067645e2b13783c
Christian Brabandt <cb@256bit.org>
parents:
10048
diff
changeset
|
107 hi def link occamOperator Operator |
46763b01cd9a
commit https://github.com/vim/vim/commit/f37506f60f87d52a9e8850e30067645e2b13783c
Christian Brabandt <cb@256bit.org>
parents:
10048
diff
changeset
|
108 hi def link occamFunction Ignore |
46763b01cd9a
commit https://github.com/vim/vim/commit/f37506f60f87d52a9e8850e30067645e2b13783c
Christian Brabandt <cb@256bit.org>
parents:
10048
diff
changeset
|
109 hi def link occamRepeat Repeat |
46763b01cd9a
commit https://github.com/vim/vim/commit/f37506f60f87d52a9e8850e30067645e2b13783c
Christian Brabandt <cb@256bit.org>
parents:
10048
diff
changeset
|
110 hi def link occamConditional Conditional |
46763b01cd9a
commit https://github.com/vim/vim/commit/f37506f60f87d52a9e8850e30067645e2b13783c
Christian Brabandt <cb@256bit.org>
parents:
10048
diff
changeset
|
111 hi def link occamBrackets Type |
46763b01cd9a
commit https://github.com/vim/vim/commit/f37506f60f87d52a9e8850e30067645e2b13783c
Christian Brabandt <cb@256bit.org>
parents:
10048
diff
changeset
|
112 hi def link occamParantheses Delimiter |
7 | 113 |
114 | |
115 let b:current_syntax = "occam" | |
116 |