annotate runtime/syntax/clean.vim @ 10048:43efa4f5a8ea

commit https://github.com/vim/vim/commit/89bcfda6834aba724d12554a34b9ed49f5789fd5 Author: Bram Moolenaar <Bram@vim.org> Date: Tue Aug 30 23:26:57 2016 +0200 Updated runtime files. Remove version checks for Vim older than 6.0.
author Christian Brabandt <cb@256bit.org>
date Tue, 30 Aug 2016 23:30:09 +0200
parents 9521463d4fc1
children 46763b01cd9a
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: Clean
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
3 " Author: Pieter van Engelen <pietere@sci.kun.nl>
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
4 " Co-Author: Arthur van Leeuwen <arthurvl@sci.kun.nl>
5425
9521463d4fc1 Update runtime files.
Bram Moolenaar <bram@vim.org>
parents: 4992
diff changeset
5 " Last Change: 2013 Oct 15 by Jurriƫn Stutterheim
7
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
6
10048
43efa4f5a8ea commit https://github.com/vim/vim/commit/89bcfda6834aba724d12554a34b9ed49f5789fd5
Christian Brabandt <cb@256bit.org>
parents: 5425
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: 5425
diff changeset
8 if exists("b:current_syntax")
7
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
9 finish
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
10 endif
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
11
3237
91e53bcb7946 Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents: 7
diff changeset
12 let s:cpo_save = &cpo
91e53bcb7946 Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents: 7
diff changeset
13 set cpo&vim
91e53bcb7946 Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents: 7
diff changeset
14
7
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
15 " Some Clean-keywords
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
16 syn keyword cleanConditional if case
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
17 syn keyword cleanLabel let! with where in of
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
18 syn keyword cleanSpecial Start
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
19 syn keyword cleanKeyword infixl infixr infix
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
20 syn keyword cleanBasicType Int Real Char Bool String
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
21 syn keyword cleanSpecialType World ProcId Void Files File
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
22 syn keyword cleanModuleSystem module implementation definition system
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
23 syn keyword cleanTypeClass class instance export
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
24
4992
ceb5f21cda79 Update runtime files.
Bram Moolenaar <bram@vim.org>
parents: 4358
diff changeset
25 " Import highlighting
ceb5f21cda79 Update runtime files.
Bram Moolenaar <bram@vim.org>
parents: 4358
diff changeset
26 syn region cleanIncludeRegion start="^\s*\(from\|import\|\s\+\(as\|qualified\)\)" end="\n" contains=cleanIncludeKeyword keepend
ceb5f21cda79 Update runtime files.
Bram Moolenaar <bram@vim.org>
parents: 4358
diff changeset
27 syn keyword cleanIncludeKeyword contained from import as qualified
ceb5f21cda79 Update runtime files.
Bram Moolenaar <bram@vim.org>
parents: 4358
diff changeset
28
7
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
29 " To do some Denotation Highlighting
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
30 syn keyword cleanBoolDenot True False
5425
9521463d4fc1 Update runtime files.
Bram Moolenaar <bram@vim.org>
parents: 4992
diff changeset
31 syn region cleanStringDenot start=+"+ skip=+\(\(\\\\\)\+\|\\"\)+ end=+"+ display
9521463d4fc1 Update runtime files.
Bram Moolenaar <bram@vim.org>
parents: 4992
diff changeset
32 syn match cleanCharDenot "'\(\\\\\|\\'\|[^'\\]\)\+'" display
9521463d4fc1 Update runtime files.
Bram Moolenaar <bram@vim.org>
parents: 4992
diff changeset
33 syn match cleanIntegerDenot "[\~+-]\?\<\(\d\+\|0[0-7]\+\|0x[0-9A-Fa-f]\+\)\>" display
9521463d4fc1 Update runtime files.
Bram Moolenaar <bram@vim.org>
parents: 4992
diff changeset
34 syn match cleanRealDenot "[\~+-]\?\d\+\.\d\+\(E[\~+-]\?\d\+\)\?" display
7
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
35
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
36 " To highlight the use of lists, tuples and arrays
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
37 syn region cleanList start="\[" end="\]" contains=ALL
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
38 syn region cleanRecord start="{" end="}" contains=ALL
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
39 syn region cleanArray start="{:" end=":}" contains=ALL
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
40 syn match cleanTuple "([^=]*,[^=]*)" contains=ALL
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
41
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
42 " To do some Comment Highlighting
5425
9521463d4fc1 Update runtime files.
Bram Moolenaar <bram@vim.org>
parents: 4992
diff changeset
43 syn region cleanComment start="/\*" end="\*/" contains=cleanComment,cleanTodo fold
9521463d4fc1 Update runtime files.
Bram Moolenaar <bram@vim.org>
parents: 4992
diff changeset
44 syn region cleanComment start="//.*" end="$" display contains=cleanTodo
9521463d4fc1 Update runtime files.
Bram Moolenaar <bram@vim.org>
parents: 4992
diff changeset
45 syn keyword cleanTodo TODO FIXME XXX contained
7
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
46
5425
9521463d4fc1 Update runtime files.
Bram Moolenaar <bram@vim.org>
parents: 4992
diff changeset
47 " Now for some useful type definition recognition
9521463d4fc1 Update runtime files.
Bram Moolenaar <bram@vim.org>
parents: 4992
diff changeset
48 syn match cleanFuncTypeDef "\([a-zA-Z].*\|(\=[-~@#$%^?!+*<>\/|&=:]\+)\=\)\s*\(infix[lr]\=\)\=\s*\d\=\s*::.*->.*" contains=cleanSpecial,cleanBasicType,cleanSpecialType,cleanKeyword
9521463d4fc1 Update runtime files.
Bram Moolenaar <bram@vim.org>
parents: 4992
diff changeset
49
7
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
50
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
51 " Define the default highlighting.
10048
43efa4f5a8ea commit https://github.com/vim/vim/commit/89bcfda6834aba724d12554a34b9ed49f5789fd5
Christian Brabandt <cb@256bit.org>
parents: 5425
diff changeset
52 " Only when an item doesn't have highlighting yet
43efa4f5a8ea commit https://github.com/vim/vim/commit/89bcfda6834aba724d12554a34b9ed49f5789fd5
Christian Brabandt <cb@256bit.org>
parents: 5425
diff changeset
53 command -nargs=+ HiLink hi def link <args>
7
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
54
10048
43efa4f5a8ea commit https://github.com/vim/vim/commit/89bcfda6834aba724d12554a34b9ed49f5789fd5
Christian Brabandt <cb@256bit.org>
parents: 5425
diff changeset
55 " Comments
43efa4f5a8ea commit https://github.com/vim/vim/commit/89bcfda6834aba724d12554a34b9ed49f5789fd5
Christian Brabandt <cb@256bit.org>
parents: 5425
diff changeset
56 HiLink cleanComment Comment
43efa4f5a8ea commit https://github.com/vim/vim/commit/89bcfda6834aba724d12554a34b9ed49f5789fd5
Christian Brabandt <cb@256bit.org>
parents: 5425
diff changeset
57 " Constants and denotations
43efa4f5a8ea commit https://github.com/vim/vim/commit/89bcfda6834aba724d12554a34b9ed49f5789fd5
Christian Brabandt <cb@256bit.org>
parents: 5425
diff changeset
58 HiLink cleanStringDenot String
43efa4f5a8ea commit https://github.com/vim/vim/commit/89bcfda6834aba724d12554a34b9ed49f5789fd5
Christian Brabandt <cb@256bit.org>
parents: 5425
diff changeset
59 HiLink cleanCharDenot Character
43efa4f5a8ea commit https://github.com/vim/vim/commit/89bcfda6834aba724d12554a34b9ed49f5789fd5
Christian Brabandt <cb@256bit.org>
parents: 5425
diff changeset
60 HiLink cleanIntegerDenot Number
43efa4f5a8ea commit https://github.com/vim/vim/commit/89bcfda6834aba724d12554a34b9ed49f5789fd5
Christian Brabandt <cb@256bit.org>
parents: 5425
diff changeset
61 HiLink cleanBoolDenot Boolean
43efa4f5a8ea commit https://github.com/vim/vim/commit/89bcfda6834aba724d12554a34b9ed49f5789fd5
Christian Brabandt <cb@256bit.org>
parents: 5425
diff changeset
62 HiLink cleanRealDenot Float
43efa4f5a8ea commit https://github.com/vim/vim/commit/89bcfda6834aba724d12554a34b9ed49f5789fd5
Christian Brabandt <cb@256bit.org>
parents: 5425
diff changeset
63 " Identifiers
43efa4f5a8ea commit https://github.com/vim/vim/commit/89bcfda6834aba724d12554a34b9ed49f5789fd5
Christian Brabandt <cb@256bit.org>
parents: 5425
diff changeset
64 " Statements
43efa4f5a8ea commit https://github.com/vim/vim/commit/89bcfda6834aba724d12554a34b9ed49f5789fd5
Christian Brabandt <cb@256bit.org>
parents: 5425
diff changeset
65 HiLink cleanTypeClass Keyword
43efa4f5a8ea commit https://github.com/vim/vim/commit/89bcfda6834aba724d12554a34b9ed49f5789fd5
Christian Brabandt <cb@256bit.org>
parents: 5425
diff changeset
66 HiLink cleanConditional Conditional
43efa4f5a8ea commit https://github.com/vim/vim/commit/89bcfda6834aba724d12554a34b9ed49f5789fd5
Christian Brabandt <cb@256bit.org>
parents: 5425
diff changeset
67 HiLink cleanLabel Label
43efa4f5a8ea commit https://github.com/vim/vim/commit/89bcfda6834aba724d12554a34b9ed49f5789fd5
Christian Brabandt <cb@256bit.org>
parents: 5425
diff changeset
68 HiLink cleanKeyword Keyword
43efa4f5a8ea commit https://github.com/vim/vim/commit/89bcfda6834aba724d12554a34b9ed49f5789fd5
Christian Brabandt <cb@256bit.org>
parents: 5425
diff changeset
69 " Generic Preprocessing
43efa4f5a8ea commit https://github.com/vim/vim/commit/89bcfda6834aba724d12554a34b9ed49f5789fd5
Christian Brabandt <cb@256bit.org>
parents: 5425
diff changeset
70 HiLink cleanIncludeKeyword Include
43efa4f5a8ea commit https://github.com/vim/vim/commit/89bcfda6834aba724d12554a34b9ed49f5789fd5
Christian Brabandt <cb@256bit.org>
parents: 5425
diff changeset
71 HiLink cleanModuleSystem PreProc
43efa4f5a8ea commit https://github.com/vim/vim/commit/89bcfda6834aba724d12554a34b9ed49f5789fd5
Christian Brabandt <cb@256bit.org>
parents: 5425
diff changeset
72 " Type
43efa4f5a8ea commit https://github.com/vim/vim/commit/89bcfda6834aba724d12554a34b9ed49f5789fd5
Christian Brabandt <cb@256bit.org>
parents: 5425
diff changeset
73 HiLink cleanBasicType Type
43efa4f5a8ea commit https://github.com/vim/vim/commit/89bcfda6834aba724d12554a34b9ed49f5789fd5
Christian Brabandt <cb@256bit.org>
parents: 5425
diff changeset
74 HiLink cleanSpecialType Type
43efa4f5a8ea commit https://github.com/vim/vim/commit/89bcfda6834aba724d12554a34b9ed49f5789fd5
Christian Brabandt <cb@256bit.org>
parents: 5425
diff changeset
75 HiLink cleanFuncTypeDef Typedef
43efa4f5a8ea commit https://github.com/vim/vim/commit/89bcfda6834aba724d12554a34b9ed49f5789fd5
Christian Brabandt <cb@256bit.org>
parents: 5425
diff changeset
76 " Special
43efa4f5a8ea commit https://github.com/vim/vim/commit/89bcfda6834aba724d12554a34b9ed49f5789fd5
Christian Brabandt <cb@256bit.org>
parents: 5425
diff changeset
77 HiLink cleanSpecial Special
43efa4f5a8ea commit https://github.com/vim/vim/commit/89bcfda6834aba724d12554a34b9ed49f5789fd5
Christian Brabandt <cb@256bit.org>
parents: 5425
diff changeset
78 HiLink cleanList Special
43efa4f5a8ea commit https://github.com/vim/vim/commit/89bcfda6834aba724d12554a34b9ed49f5789fd5
Christian Brabandt <cb@256bit.org>
parents: 5425
diff changeset
79 HiLink cleanArray Special
43efa4f5a8ea commit https://github.com/vim/vim/commit/89bcfda6834aba724d12554a34b9ed49f5789fd5
Christian Brabandt <cb@256bit.org>
parents: 5425
diff changeset
80 HiLink cleanRecord Special
43efa4f5a8ea commit https://github.com/vim/vim/commit/89bcfda6834aba724d12554a34b9ed49f5789fd5
Christian Brabandt <cb@256bit.org>
parents: 5425
diff changeset
81 HiLink cleanTuple Special
43efa4f5a8ea commit https://github.com/vim/vim/commit/89bcfda6834aba724d12554a34b9ed49f5789fd5
Christian Brabandt <cb@256bit.org>
parents: 5425
diff changeset
82 " Error
43efa4f5a8ea commit https://github.com/vim/vim/commit/89bcfda6834aba724d12554a34b9ed49f5789fd5
Christian Brabandt <cb@256bit.org>
parents: 5425
diff changeset
83 " Todo
43efa4f5a8ea commit https://github.com/vim/vim/commit/89bcfda6834aba724d12554a34b9ed49f5789fd5
Christian Brabandt <cb@256bit.org>
parents: 5425
diff changeset
84 HiLink cleanTodo Todo
7
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
85
10048
43efa4f5a8ea commit https://github.com/vim/vim/commit/89bcfda6834aba724d12554a34b9ed49f5789fd5
Christian Brabandt <cb@256bit.org>
parents: 5425
diff changeset
86 delcommand HiLink
7
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
87
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
88 let b:current_syntax = "clean"
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
89
3237
91e53bcb7946 Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents: 7
diff changeset
90 let &cpo = s:cpo_save
91e53bcb7946 Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents: 7
diff changeset
91 unlet s:cpo_save
7
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
92 " vim: ts=4