annotate runtime/syntax/clean.vim @ 12989:0f88d30758ce

Added tag v8.0.1370 for changeset da725bc3fd2c00a78d47f81ea7c135093b78a555
author Christian Brabandt <cb@256bit.org>
date Tue, 05 Dec 2017 14:15:05 +0100
parents 46763b01cd9a
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
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
7
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
53
10048
43efa4f5a8ea commit https://github.com/vim/vim/commit/89bcfda6834aba724d12554a34b9ed49f5789fd5
Christian Brabandt <cb@256bit.org>
parents: 5425
diff changeset
54 " Comments
10051
46763b01cd9a commit https://github.com/vim/vim/commit/f37506f60f87d52a9e8850e30067645e2b13783c
Christian Brabandt <cb@256bit.org>
parents: 10048
diff changeset
55 hi def link cleanComment Comment
10048
43efa4f5a8ea commit https://github.com/vim/vim/commit/89bcfda6834aba724d12554a34b9ed49f5789fd5
Christian Brabandt <cb@256bit.org>
parents: 5425
diff changeset
56 " Constants and denotations
10051
46763b01cd9a commit https://github.com/vim/vim/commit/f37506f60f87d52a9e8850e30067645e2b13783c
Christian Brabandt <cb@256bit.org>
parents: 10048
diff changeset
57 hi def link cleanStringDenot String
46763b01cd9a commit https://github.com/vim/vim/commit/f37506f60f87d52a9e8850e30067645e2b13783c
Christian Brabandt <cb@256bit.org>
parents: 10048
diff changeset
58 hi def link cleanCharDenot Character
46763b01cd9a commit https://github.com/vim/vim/commit/f37506f60f87d52a9e8850e30067645e2b13783c
Christian Brabandt <cb@256bit.org>
parents: 10048
diff changeset
59 hi def link cleanIntegerDenot Number
46763b01cd9a commit https://github.com/vim/vim/commit/f37506f60f87d52a9e8850e30067645e2b13783c
Christian Brabandt <cb@256bit.org>
parents: 10048
diff changeset
60 hi def link cleanBoolDenot Boolean
46763b01cd9a commit https://github.com/vim/vim/commit/f37506f60f87d52a9e8850e30067645e2b13783c
Christian Brabandt <cb@256bit.org>
parents: 10048
diff changeset
61 hi def link cleanRealDenot Float
10048
43efa4f5a8ea commit https://github.com/vim/vim/commit/89bcfda6834aba724d12554a34b9ed49f5789fd5
Christian Brabandt <cb@256bit.org>
parents: 5425
diff changeset
62 " Identifiers
43efa4f5a8ea commit https://github.com/vim/vim/commit/89bcfda6834aba724d12554a34b9ed49f5789fd5
Christian Brabandt <cb@256bit.org>
parents: 5425
diff changeset
63 " Statements
10051
46763b01cd9a commit https://github.com/vim/vim/commit/f37506f60f87d52a9e8850e30067645e2b13783c
Christian Brabandt <cb@256bit.org>
parents: 10048
diff changeset
64 hi def link cleanTypeClass Keyword
46763b01cd9a commit https://github.com/vim/vim/commit/f37506f60f87d52a9e8850e30067645e2b13783c
Christian Brabandt <cb@256bit.org>
parents: 10048
diff changeset
65 hi def link cleanConditional Conditional
46763b01cd9a commit https://github.com/vim/vim/commit/f37506f60f87d52a9e8850e30067645e2b13783c
Christian Brabandt <cb@256bit.org>
parents: 10048
diff changeset
66 hi def link cleanLabel Label
46763b01cd9a commit https://github.com/vim/vim/commit/f37506f60f87d52a9e8850e30067645e2b13783c
Christian Brabandt <cb@256bit.org>
parents: 10048
diff changeset
67 hi def link cleanKeyword Keyword
10048
43efa4f5a8ea commit https://github.com/vim/vim/commit/89bcfda6834aba724d12554a34b9ed49f5789fd5
Christian Brabandt <cb@256bit.org>
parents: 5425
diff changeset
68 " Generic Preprocessing
10051
46763b01cd9a commit https://github.com/vim/vim/commit/f37506f60f87d52a9e8850e30067645e2b13783c
Christian Brabandt <cb@256bit.org>
parents: 10048
diff changeset
69 hi def link cleanIncludeKeyword Include
46763b01cd9a commit https://github.com/vim/vim/commit/f37506f60f87d52a9e8850e30067645e2b13783c
Christian Brabandt <cb@256bit.org>
parents: 10048
diff changeset
70 hi def link cleanModuleSystem PreProc
10048
43efa4f5a8ea commit https://github.com/vim/vim/commit/89bcfda6834aba724d12554a34b9ed49f5789fd5
Christian Brabandt <cb@256bit.org>
parents: 5425
diff changeset
71 " Type
10051
46763b01cd9a commit https://github.com/vim/vim/commit/f37506f60f87d52a9e8850e30067645e2b13783c
Christian Brabandt <cb@256bit.org>
parents: 10048
diff changeset
72 hi def link cleanBasicType Type
46763b01cd9a commit https://github.com/vim/vim/commit/f37506f60f87d52a9e8850e30067645e2b13783c
Christian Brabandt <cb@256bit.org>
parents: 10048
diff changeset
73 hi def link cleanSpecialType Type
46763b01cd9a commit https://github.com/vim/vim/commit/f37506f60f87d52a9e8850e30067645e2b13783c
Christian Brabandt <cb@256bit.org>
parents: 10048
diff changeset
74 hi def link cleanFuncTypeDef Typedef
10048
43efa4f5a8ea commit https://github.com/vim/vim/commit/89bcfda6834aba724d12554a34b9ed49f5789fd5
Christian Brabandt <cb@256bit.org>
parents: 5425
diff changeset
75 " Special
10051
46763b01cd9a commit https://github.com/vim/vim/commit/f37506f60f87d52a9e8850e30067645e2b13783c
Christian Brabandt <cb@256bit.org>
parents: 10048
diff changeset
76 hi def link cleanSpecial Special
46763b01cd9a commit https://github.com/vim/vim/commit/f37506f60f87d52a9e8850e30067645e2b13783c
Christian Brabandt <cb@256bit.org>
parents: 10048
diff changeset
77 hi def link cleanList Special
46763b01cd9a commit https://github.com/vim/vim/commit/f37506f60f87d52a9e8850e30067645e2b13783c
Christian Brabandt <cb@256bit.org>
parents: 10048
diff changeset
78 hi def link cleanArray Special
46763b01cd9a commit https://github.com/vim/vim/commit/f37506f60f87d52a9e8850e30067645e2b13783c
Christian Brabandt <cb@256bit.org>
parents: 10048
diff changeset
79 hi def link cleanRecord Special
46763b01cd9a commit https://github.com/vim/vim/commit/f37506f60f87d52a9e8850e30067645e2b13783c
Christian Brabandt <cb@256bit.org>
parents: 10048
diff changeset
80 hi def link cleanTuple Special
10048
43efa4f5a8ea commit https://github.com/vim/vim/commit/89bcfda6834aba724d12554a34b9ed49f5789fd5
Christian Brabandt <cb@256bit.org>
parents: 5425
diff changeset
81 " Error
43efa4f5a8ea commit https://github.com/vim/vim/commit/89bcfda6834aba724d12554a34b9ed49f5789fd5
Christian Brabandt <cb@256bit.org>
parents: 5425
diff changeset
82 " Todo
10051
46763b01cd9a commit https://github.com/vim/vim/commit/f37506f60f87d52a9e8850e30067645e2b13783c
Christian Brabandt <cb@256bit.org>
parents: 10048
diff changeset
83 hi def link cleanTodo Todo
7
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
84
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
85
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
86 let b:current_syntax = "clean"
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
87
3237
91e53bcb7946 Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents: 7
diff changeset
88 let &cpo = s:cpo_save
91e53bcb7946 Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents: 7
diff changeset
89 unlet s:cpo_save
7
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
90 " vim: ts=4