Mercurial > vim
annotate runtime/syntax/lace.vim @ 20564:63370fc0b915
Added tag v8.2.0835 for changeset a5a24d688e11ceebdf3174ac8b025aa6f21ac0ed
author | Bram Moolenaar <Bram@vim.org> |
---|---|
date | Thu, 28 May 2020 21:15:05 +0200 |
parents | 46763b01cd9a |
children |
rev | line source |
---|---|
7 | 1 " Vim syntax file |
2 " Language: lace | |
3 " Maintainer: Jocelyn Fiat <utilities@eiffel.com> | |
4 " Last Change: 2001 May 09 | |
5 | |
6 " Copyright Interactive Software Engineering, 1998 | |
7 " You are free to use this file as you please, but | |
8 " if you make a change or improvement you must send | |
9 " it to the maintainer at <utilities@eiffel.com> | |
10 | |
11 | |
10048
43efa4f5a8ea
commit https://github.com/vim/vim/commit/89bcfda6834aba724d12554a34b9ed49f5789fd5
Christian Brabandt <cb@256bit.org>
parents:
7
diff
changeset
|
12 " 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
|
13 if exists("b:current_syntax") |
7 | 14 finish |
15 endif | |
16 | |
17 " LACE is case insensitive, but the style guide lines are not. | |
18 | |
19 if !exists("lace_case_insensitive") | |
20 syn case match | |
21 else | |
22 syn case ignore | |
23 endif | |
24 | |
25 " A bunch of useful LACE keywords | |
26 syn keyword laceTopStruct system root default option visible cluster | |
27 syn keyword laceTopStruct external generate end | |
28 syn keyword laceOptionClause collect assertion debug optimize trace | |
29 syn keyword laceOptionClause profile inline precompiled multithreaded | |
30 syn keyword laceOptionClause exception_trace dead_code_removal | |
31 syn keyword laceOptionClause array_optimization | |
32 syn keyword laceOptionClause inlining_size inlining | |
33 syn keyword laceOptionClause console_application dynamic_runtime | |
34 syn keyword laceOptionClause line_generation | |
35 syn keyword laceOptionMark yes no all | |
36 syn keyword laceOptionMark require ensure invariant loop check | |
37 syn keyword laceClusterProp use include exclude | |
38 syn keyword laceAdaptClassName adapt ignore rename as | |
39 syn keyword laceAdaptClassName creation export visible | |
40 syn keyword laceExternal include_path object makefile | |
41 | |
42 " Operators | |
43 syn match laceOperator "\$" | |
44 syn match laceBrackets "[[\]]" | |
45 syn match laceExport "[{}]" | |
46 | |
47 " Constants | |
48 syn keyword laceBool true false | |
49 syn keyword laceBool True False | |
50 syn region laceString start=+"+ skip=+%"+ end=+"+ contains=laceEscape,laceStringError | |
51 syn match laceEscape contained "%[^/]" | |
52 syn match laceEscape contained "%/\d\+/" | |
53 syn match laceEscape contained "^[ \t]*%" | |
54 syn match laceEscape contained "%[ \t]*$" | |
55 syn match laceStringError contained "%/[^0-9]" | |
56 syn match laceStringError contained "%/\d\+[^0-9/]" | |
57 syn match laceStringError "'\(%[^/]\|%/\d\+/\|[^'%]\)\+'" | |
58 syn match laceCharacter "'\(%[^/]\|%/\d\+/\|[^'%]\)'" contains=laceEscape | |
59 syn match laceNumber "-\=\<\d\+\(_\d\+\)*\>" | |
60 syn match laceNumber "\<[01]\+[bB]\>" | |
61 syn match laceNumber "-\=\<\d\+\(_\d\+\)*\.\(\d\+\(_\d\+\)*\)\=\([eE][-+]\=\d\+\(_\d\+\)*\)\=" | |
62 syn match laceNumber "-\=\.\d\+\(_\d\+\)*\([eE][-+]\=\d\+\(_\d\+\)*\)\=" | |
63 syn match laceComment "--.*" contains=laceTodo | |
64 | |
65 | |
66 syn case match | |
67 | |
68 " Case sensitive stuff | |
69 | |
70 syn keyword laceTodo TODO XXX FIXME | |
71 syn match laceClassName "\<[A-Z][A-Z0-9_]*\>" | |
72 syn match laceCluster "[a-zA-Z][a-zA-Z0-9_]*\s*:" | |
73 syn match laceCluster "[a-zA-Z][a-zA-Z0-9_]*\s*(\s*[a-zA-Z][a-zA-Z0-9_]*\s*)\s*:" | |
74 | |
75 " Catch mismatched parentheses | |
76 syn match laceParenError ")" | |
77 syn match laceBracketError "\]" | |
78 syn region laceGeneric transparent matchgroup=laceBrackets start="\[" end="\]" contains=ALLBUT,laceBracketError | |
79 syn region laceParen transparent start="(" end=")" contains=ALLBUT,laceParenError | |
80 | |
81 " Should suffice for even very long strings and expressions | |
82 syn sync lines=40 | |
83 | |
84 " Define the default highlighting. | |
10048
43efa4f5a8ea
commit https://github.com/vim/vim/commit/89bcfda6834aba724d12554a34b9ed49f5789fd5
Christian Brabandt <cb@256bit.org>
parents:
7
diff
changeset
|
85 " Only when an item doesn't have highlighting yet |
43efa4f5a8ea
commit https://github.com/vim/vim/commit/89bcfda6834aba724d12554a34b9ed49f5789fd5
Christian Brabandt <cb@256bit.org>
parents:
7
diff
changeset
|
86 |
10051
46763b01cd9a
commit https://github.com/vim/vim/commit/f37506f60f87d52a9e8850e30067645e2b13783c
Christian Brabandt <cb@256bit.org>
parents:
10048
diff
changeset
|
87 hi def link laceTopStruct PreProc |
7 | 88 |
10051
46763b01cd9a
commit https://github.com/vim/vim/commit/f37506f60f87d52a9e8850e30067645e2b13783c
Christian Brabandt <cb@256bit.org>
parents:
10048
diff
changeset
|
89 hi def link laceOptionClause Statement |
46763b01cd9a
commit https://github.com/vim/vim/commit/f37506f60f87d52a9e8850e30067645e2b13783c
Christian Brabandt <cb@256bit.org>
parents:
10048
diff
changeset
|
90 hi def link laceOptionMark Constant |
46763b01cd9a
commit https://github.com/vim/vim/commit/f37506f60f87d52a9e8850e30067645e2b13783c
Christian Brabandt <cb@256bit.org>
parents:
10048
diff
changeset
|
91 hi def link laceClusterProp Label |
46763b01cd9a
commit https://github.com/vim/vim/commit/f37506f60f87d52a9e8850e30067645e2b13783c
Christian Brabandt <cb@256bit.org>
parents:
10048
diff
changeset
|
92 hi def link laceAdaptClassName Label |
46763b01cd9a
commit https://github.com/vim/vim/commit/f37506f60f87d52a9e8850e30067645e2b13783c
Christian Brabandt <cb@256bit.org>
parents:
10048
diff
changeset
|
93 hi def link laceExternal Statement |
46763b01cd9a
commit https://github.com/vim/vim/commit/f37506f60f87d52a9e8850e30067645e2b13783c
Christian Brabandt <cb@256bit.org>
parents:
10048
diff
changeset
|
94 hi def link laceCluster ModeMsg |
7 | 95 |
10051
46763b01cd9a
commit https://github.com/vim/vim/commit/f37506f60f87d52a9e8850e30067645e2b13783c
Christian Brabandt <cb@256bit.org>
parents:
10048
diff
changeset
|
96 hi def link laceEscape Special |
7 | 97 |
10051
46763b01cd9a
commit https://github.com/vim/vim/commit/f37506f60f87d52a9e8850e30067645e2b13783c
Christian Brabandt <cb@256bit.org>
parents:
10048
diff
changeset
|
98 hi def link laceBool Boolean |
46763b01cd9a
commit https://github.com/vim/vim/commit/f37506f60f87d52a9e8850e30067645e2b13783c
Christian Brabandt <cb@256bit.org>
parents:
10048
diff
changeset
|
99 hi def link laceString String |
46763b01cd9a
commit https://github.com/vim/vim/commit/f37506f60f87d52a9e8850e30067645e2b13783c
Christian Brabandt <cb@256bit.org>
parents:
10048
diff
changeset
|
100 hi def link laceCharacter Character |
46763b01cd9a
commit https://github.com/vim/vim/commit/f37506f60f87d52a9e8850e30067645e2b13783c
Christian Brabandt <cb@256bit.org>
parents:
10048
diff
changeset
|
101 hi def link laceClassName Type |
46763b01cd9a
commit https://github.com/vim/vim/commit/f37506f60f87d52a9e8850e30067645e2b13783c
Christian Brabandt <cb@256bit.org>
parents:
10048
diff
changeset
|
102 hi def link laceNumber Number |
7 | 103 |
10051
46763b01cd9a
commit https://github.com/vim/vim/commit/f37506f60f87d52a9e8850e30067645e2b13783c
Christian Brabandt <cb@256bit.org>
parents:
10048
diff
changeset
|
104 hi def link laceOperator Special |
46763b01cd9a
commit https://github.com/vim/vim/commit/f37506f60f87d52a9e8850e30067645e2b13783c
Christian Brabandt <cb@256bit.org>
parents:
10048
diff
changeset
|
105 hi def link laceArray Special |
46763b01cd9a
commit https://github.com/vim/vim/commit/f37506f60f87d52a9e8850e30067645e2b13783c
Christian Brabandt <cb@256bit.org>
parents:
10048
diff
changeset
|
106 hi def link laceExport Special |
46763b01cd9a
commit https://github.com/vim/vim/commit/f37506f60f87d52a9e8850e30067645e2b13783c
Christian Brabandt <cb@256bit.org>
parents:
10048
diff
changeset
|
107 hi def link laceCreation Special |
46763b01cd9a
commit https://github.com/vim/vim/commit/f37506f60f87d52a9e8850e30067645e2b13783c
Christian Brabandt <cb@256bit.org>
parents:
10048
diff
changeset
|
108 hi def link laceBrackets Special |
46763b01cd9a
commit https://github.com/vim/vim/commit/f37506f60f87d52a9e8850e30067645e2b13783c
Christian Brabandt <cb@256bit.org>
parents:
10048
diff
changeset
|
109 hi def link laceConstraint Special |
7 | 110 |
10051
46763b01cd9a
commit https://github.com/vim/vim/commit/f37506f60f87d52a9e8850e30067645e2b13783c
Christian Brabandt <cb@256bit.org>
parents:
10048
diff
changeset
|
111 hi def link laceComment Comment |
7 | 112 |
10051
46763b01cd9a
commit https://github.com/vim/vim/commit/f37506f60f87d52a9e8850e30067645e2b13783c
Christian Brabandt <cb@256bit.org>
parents:
10048
diff
changeset
|
113 hi def link laceError Error |
46763b01cd9a
commit https://github.com/vim/vim/commit/f37506f60f87d52a9e8850e30067645e2b13783c
Christian Brabandt <cb@256bit.org>
parents:
10048
diff
changeset
|
114 hi def link laceStringError Error |
46763b01cd9a
commit https://github.com/vim/vim/commit/f37506f60f87d52a9e8850e30067645e2b13783c
Christian Brabandt <cb@256bit.org>
parents:
10048
diff
changeset
|
115 hi def link laceParenError Error |
46763b01cd9a
commit https://github.com/vim/vim/commit/f37506f60f87d52a9e8850e30067645e2b13783c
Christian Brabandt <cb@256bit.org>
parents:
10048
diff
changeset
|
116 hi def link laceBracketError Error |
46763b01cd9a
commit https://github.com/vim/vim/commit/f37506f60f87d52a9e8850e30067645e2b13783c
Christian Brabandt <cb@256bit.org>
parents:
10048
diff
changeset
|
117 hi def link laceTodo Todo |
10048
43efa4f5a8ea
commit https://github.com/vim/vim/commit/89bcfda6834aba724d12554a34b9ed49f5789fd5
Christian Brabandt <cb@256bit.org>
parents:
7
diff
changeset
|
118 |
7 | 119 |
120 let b:current_syntax = "lace" | |
121 | |
122 " vim: ts=4 |