annotate runtime/syntax/clean.vim @ 1951:f234c87ac7e9 v7.2.248

updated for version 7.2-248
author vimboss
date Fri, 11 Sep 2009 10:49:58 +0000
parents 3fc0f57ecb91
children 91e53bcb7946
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>
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
5 " Last Change: Fri Sep 29 11:35:34 CEST 2000
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
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 cleanInclude from import
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
19 syn keyword cleanSpecial Start
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
20 syn keyword cleanKeyword infixl infixr infix
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
21 syn keyword cleanBasicType Int Real Char Bool String
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
22 syn keyword cleanSpecialType World ProcId Void Files File
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
23 syn keyword cleanModuleSystem module implementation definition system
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
24 syn keyword cleanTypeClass class instance export
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
25
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
26 " To do some Denotation Highlighting
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
27 syn keyword cleanBoolDenot True False
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
28 syn region cleanStringDenot start=+"+ end=+"+
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
29 syn match cleanCharDenot "'.'"
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
30 syn match cleanCharsDenot "'[^'\\]*\(\\.[^'\\]\)*'" contained
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
31 syn match cleanIntegerDenot "[+-~]\=\<\(\d\+\|0[0-7]\+\|0x[0-9A-Fa-f]\+\)\>"
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
32 syn match cleanRealDenot "[+-~]\=\<\d\+\.\d+\(E[+-~]\=\d+\)\="
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
33
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
34 " To highlight the use of lists, tuples and arrays
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
35 syn region cleanList start="\[" end="\]" contains=ALL
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
36 syn region cleanRecord start="{" end="}" contains=ALL
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
37 syn region cleanArray start="{:" end=":}" contains=ALL
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
38 syn match cleanTuple "([^=]*,[^=]*)" contains=ALL
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
39
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
40 " To do some Comment Highlighting
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
41 syn region cleanComment start="/\*" end="\*/" contains=cleanComment
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
42 syn match cleanComment "//.*"
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
43
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
44 " Now for some useful typedefinitionrecognition
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
45 syn match cleanFuncTypeDef "\([a-zA-Z].*\|(\=[-~@#$%^?!+*<>\/|&=:]\+)\=\)[ \t]*\(infix[lr]\=\)\=[ \t]*\d\=[ \t]*::.*->.*" contains=cleanSpecial
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
46
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
47 " Define the default highlighting.
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
48 " For version 5.7 and earlier: only when not done already
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
49 " 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
50 if version >= 508 || !exists("did_clean_syntax_init")
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
51 if version < 508
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
52 let did_clean_syntax_init = 1
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
53 command -nargs=+ HiLink hi link <args>
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
54 else
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
55 command -nargs=+ HiLink hi def link <args>
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
56 endif
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
57
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
58 " Comments
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
59 HiLink cleanComment Comment
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
60 " Constants and denotations
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
61 HiLink cleanCharsDenot String
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
62 HiLink cleanStringDenot String
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
63 HiLink cleanCharDenot Character
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
64 HiLink cleanIntegerDenot Number
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
65 HiLink cleanBoolDenot Boolean
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
66 HiLink cleanRealDenot Float
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
67 " Identifiers
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
68 " Statements
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
69 HiLink cleanTypeClass Keyword
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
70 HiLink cleanConditional Conditional
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
71 HiLink cleanLabel Label
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
72 HiLink cleanKeyword Keyword
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
73 " Generic Preprocessing
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
74 HiLink cleanInclude Include
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
75 HiLink cleanModuleSystem PreProc
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
76 " Type
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
77 HiLink cleanBasicType Type
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
78 HiLink cleanSpecialType Type
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
79 HiLink cleanFuncTypeDef Typedef
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
80 " Special
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
81 HiLink cleanSpecial Special
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
82 HiLink cleanList Special
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
83 HiLink cleanArray Special
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
84 HiLink cleanRecord Special
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
85 HiLink cleanTuple Special
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
86 " Error
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
87 " Todo
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
88
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
89 delcommand HiLink
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
90 endif
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
91
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
92 let b:current_syntax = "clean"
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
93
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
94 " vim: ts=4