annotate runtime/syntax/clean.vim @ 7428:a4838cba1f48 v7.4.1018

commit https://github.com/vim/vim/commit/af2dff8fbc0e0c1dd7cb5ae058c3b896c28f7d24 Author: Bram Moolenaar <Bram@vim.org> Date: Fri Jan 1 14:57:51 2016 +0100 patch 7.4.1018 Problem: Failure running tests. Solution: Add missing change to list of old style tests.
author Christian Brabandt <cb@256bit.org>
date Fri, 01 Jan 2016 15:00:04 +0100
parents 9521463d4fc1
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: 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
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
7 " For version 5.x: Clear all syntax items
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
8 " For version 6.x: Quit when a syntax file was already loaded
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
9 if version < 600
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
10 syntax clear
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
11 elseif exists("b:current_syntax")
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
12 finish
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
13 endif
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
14
3237
91e53bcb7946 Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents: 7
diff changeset
15 let s:cpo_save = &cpo
91e53bcb7946 Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents: 7
diff changeset
16 set cpo&vim
91e53bcb7946 Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents: 7
diff changeset
17
7
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
18 " Some Clean-keywords
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
19 syn keyword cleanConditional if case
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
20 syn keyword cleanLabel let! with where in of
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
21 syn keyword cleanSpecial Start
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
22 syn keyword cleanKeyword infixl infixr infix
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
23 syn keyword cleanBasicType Int Real Char Bool String
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
24 syn keyword cleanSpecialType World ProcId Void Files File
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
25 syn keyword cleanModuleSystem module implementation definition system
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
26 syn keyword cleanTypeClass class instance export
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
27
4992
ceb5f21cda79 Update runtime files.
Bram Moolenaar <bram@vim.org>
parents: 4358
diff changeset
28 " Import highlighting
ceb5f21cda79 Update runtime files.
Bram Moolenaar <bram@vim.org>
parents: 4358
diff changeset
29 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
30 syn keyword cleanIncludeKeyword contained from import as qualified
ceb5f21cda79 Update runtime files.
Bram Moolenaar <bram@vim.org>
parents: 4358
diff changeset
31
7
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
32 " To do some Denotation Highlighting
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
33 syn keyword cleanBoolDenot True False
5425
9521463d4fc1 Update runtime files.
Bram Moolenaar <bram@vim.org>
parents: 4992
diff changeset
34 syn region cleanStringDenot start=+"+ skip=+\(\(\\\\\)\+\|\\"\)+ end=+"+ display
9521463d4fc1 Update runtime files.
Bram Moolenaar <bram@vim.org>
parents: 4992
diff changeset
35 syn match cleanCharDenot "'\(\\\\\|\\'\|[^'\\]\)\+'" display
9521463d4fc1 Update runtime files.
Bram Moolenaar <bram@vim.org>
parents: 4992
diff changeset
36 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
37 syn match cleanRealDenot "[\~+-]\?\d\+\.\d\+\(E[\~+-]\?\d\+\)\?" display
7
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
38
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
39 " To highlight the use of lists, tuples and arrays
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
40 syn region cleanList start="\[" end="\]" contains=ALL
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
41 syn region cleanRecord start="{" end="}" contains=ALL
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
42 syn region cleanArray start="{:" end=":}" contains=ALL
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
43 syn match cleanTuple "([^=]*,[^=]*)" contains=ALL
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
44
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
45 " To do some Comment Highlighting
5425
9521463d4fc1 Update runtime files.
Bram Moolenaar <bram@vim.org>
parents: 4992
diff changeset
46 syn region cleanComment start="/\*" end="\*/" contains=cleanComment,cleanTodo fold
9521463d4fc1 Update runtime files.
Bram Moolenaar <bram@vim.org>
parents: 4992
diff changeset
47 syn region cleanComment start="//.*" end="$" display contains=cleanTodo
9521463d4fc1 Update runtime files.
Bram Moolenaar <bram@vim.org>
parents: 4992
diff changeset
48 syn keyword cleanTodo TODO FIXME XXX contained
7
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
49
5425
9521463d4fc1 Update runtime files.
Bram Moolenaar <bram@vim.org>
parents: 4992
diff changeset
50 " Now for some useful type definition recognition
9521463d4fc1 Update runtime files.
Bram Moolenaar <bram@vim.org>
parents: 4992
diff changeset
51 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
52
7
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
53
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
54 " Define the default highlighting.
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
55 " For version 5.7 and earlier: only when not done already
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
56 " 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
57 if version >= 508 || !exists("did_clean_syntax_init")
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
58 if version < 508
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
59 let did_clean_syntax_init = 1
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
60 command -nargs=+ HiLink hi link <args>
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
61 else
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
62 command -nargs=+ HiLink hi def link <args>
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
63 endif
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
64
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
65 " Comments
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
66 HiLink cleanComment Comment
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
67 " Constants and denotations
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
68 HiLink cleanStringDenot String
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
69 HiLink cleanCharDenot Character
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
70 HiLink cleanIntegerDenot Number
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
71 HiLink cleanBoolDenot Boolean
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
72 HiLink cleanRealDenot Float
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
73 " Identifiers
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
74 " Statements
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
75 HiLink cleanTypeClass Keyword
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
76 HiLink cleanConditional Conditional
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
77 HiLink cleanLabel Label
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
78 HiLink cleanKeyword Keyword
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
79 " Generic Preprocessing
4992
ceb5f21cda79 Update runtime files.
Bram Moolenaar <bram@vim.org>
parents: 4358
diff changeset
80 HiLink cleanIncludeKeyword Include
7
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
81 HiLink cleanModuleSystem PreProc
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
82 " Type
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
83 HiLink cleanBasicType Type
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
84 HiLink cleanSpecialType Type
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
85 HiLink cleanFuncTypeDef Typedef
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
86 " Special
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
87 HiLink cleanSpecial Special
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
88 HiLink cleanList Special
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
89 HiLink cleanArray Special
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
90 HiLink cleanRecord Special
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
91 HiLink cleanTuple Special
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
92 " Error
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
93 " Todo
5425
9521463d4fc1 Update runtime files.
Bram Moolenaar <bram@vim.org>
parents: 4992
diff changeset
94 HiLink cleanTodo Todo
7
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
95
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
96 delcommand HiLink
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
97 endif
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
98
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
99 let b:current_syntax = "clean"
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
100
3237
91e53bcb7946 Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents: 7
diff changeset
101 let &cpo = s:cpo_save
91e53bcb7946 Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents: 7
diff changeset
102 unlet s:cpo_save
7
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
103 " vim: ts=4