Mercurial > vim
annotate runtime/syntax/slang.vim @ 17479:35b73ec0ba25
Added tag v8.1.1737 for changeset f9a4433061742d95f7152c44a1ddf9b9899b0af9
author | Bram Moolenaar <Bram@vim.org> |
---|---|
date | Tue, 23 Jul 2019 23:15:06 +0200 |
parents | 46763b01cd9a |
children |
rev | line source |
---|---|
7 | 1 " Vim syntax file |
2 " Language: S-Lang | |
3 " Maintainer: Jan Hlavacek <lahvak@math.ohio-state.edu> | |
4 " Last Change: 980216 | |
5 | |
10048
43efa4f5a8ea
commit https://github.com/vim/vim/commit/89bcfda6834aba724d12554a34b9ed49f5789fd5
Christian Brabandt <cb@256bit.org>
parents:
7
diff
changeset
|
6 " 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
|
7 if exists("b:current_syntax") |
7 | 8 finish |
9 endif | |
10 | |
11 syn keyword slangStatement break return continue EXECUTE_ERROR_BLOCK | |
12 syn match slangStatement "\<X_USER_BLOCK[0-4]\>" | |
13 syn keyword slangLabel case | |
14 syn keyword slangConditional !if if else switch | |
15 syn keyword slangRepeat while for _for loop do forever | |
16 syn keyword slangDefinition define typedef variable struct | |
17 syn keyword slangOperator or and andelse orelse shr shl xor not | |
18 syn keyword slangBlock EXIT_BLOCK ERROR_BLOCK | |
19 syn match slangBlock "\<USER_BLOCK[0-4]\>" | |
20 syn keyword slangConstant NULL | |
21 syn keyword slangType Integer_Type Double_Type Complex_Type String_Type Struct_Type Ref_Type Null_Type Array_Type DataType_Type | |
22 | |
23 syn match slangOctal "\<0\d\+\>" contains=slangOctalError | |
24 syn match slangOctalError "[89]\+" contained | |
25 syn match slangHex "\<0[xX][0-9A-Fa-f]*\>" | |
26 syn match slangDecimal "\<[1-9]\d*\>" | |
27 syn match slangFloat "\<\d\+\." | |
28 syn match slangFloat "\<\d\+\.\d\+\([Ee][-+]\=\d\+\)\=\>" | |
29 syn match slangFloat "\<\d\+\.[Ee][-+]\=\d\+\>" | |
30 syn match slangFloat "\<\d\+[Ee][-+]\=\d\+\>" | |
31 syn match slangFloat "\.\d\+\([Ee][-+]\=\d\+\)\=\>" | |
32 syn match slangImaginary "\.\d\+\([Ee][-+]\=\d*\)\=[ij]\>" | |
33 syn match slangImaginary "\<\d\+\(\.\d*\)\=\([Ee][-+]\=\d\+\)\=[ij]\>" | |
34 | |
35 syn region slangString oneline start='"' end='"' skip='\\"' | |
36 syn match slangCharacter "'[^\\]'" | |
37 syn match slangCharacter "'\\.'" | |
38 syn match slangCharacter "'\\[0-7]\{1,3}'" | |
39 syn match slangCharacter "'\\d\d\{1,3}'" | |
40 syn match slangCharacter "'\\x[0-7a-fA-F]\{1,2}'" | |
41 | |
42 syn match slangDelim "[][{};:,]" | |
43 syn match slangOperator "[-%+/&*=<>|!~^@]" | |
44 | |
45 "catch errors caused by wrong parenthesis | |
46 syn region slangParen matchgroup=slangDelim transparent start='(' end=')' contains=ALLBUT,slangParenError | |
47 syn match slangParenError ")" | |
48 | |
49 syn match slangComment "%.*$" | |
50 syn keyword slangOperator sizeof | |
51 | |
52 syn region slangPreCondit start="^\s*#\s*\(ifdef\>\|ifndef\>\|iftrue\>\|ifnfalse\>\|iffalse\>\|ifntrue\>\|if\$\|ifn\$\|\|elif\>\|else\>\|endif\>\)" skip="\\$" end="$" contains=cComment,slangString,slangCharacter,slangNumber | |
53 | |
54 " Define the default highlighting. | |
10048
43efa4f5a8ea
commit https://github.com/vim/vim/commit/89bcfda6834aba724d12554a34b9ed49f5789fd5
Christian Brabandt <cb@256bit.org>
parents:
7
diff
changeset
|
55 " Only when an item doesn't have highlighting yet |
7 | 56 |
10051
46763b01cd9a
commit https://github.com/vim/vim/commit/f37506f60f87d52a9e8850e30067645e2b13783c
Christian Brabandt <cb@256bit.org>
parents:
10048
diff
changeset
|
57 hi def link slangDefinition Type |
46763b01cd9a
commit https://github.com/vim/vim/commit/f37506f60f87d52a9e8850e30067645e2b13783c
Christian Brabandt <cb@256bit.org>
parents:
10048
diff
changeset
|
58 hi def link slangBlock slangDefinition |
46763b01cd9a
commit https://github.com/vim/vim/commit/f37506f60f87d52a9e8850e30067645e2b13783c
Christian Brabandt <cb@256bit.org>
parents:
10048
diff
changeset
|
59 hi def link slangLabel Label |
46763b01cd9a
commit https://github.com/vim/vim/commit/f37506f60f87d52a9e8850e30067645e2b13783c
Christian Brabandt <cb@256bit.org>
parents:
10048
diff
changeset
|
60 hi def link slangConditional Conditional |
46763b01cd9a
commit https://github.com/vim/vim/commit/f37506f60f87d52a9e8850e30067645e2b13783c
Christian Brabandt <cb@256bit.org>
parents:
10048
diff
changeset
|
61 hi def link slangRepeat Repeat |
46763b01cd9a
commit https://github.com/vim/vim/commit/f37506f60f87d52a9e8850e30067645e2b13783c
Christian Brabandt <cb@256bit.org>
parents:
10048
diff
changeset
|
62 hi def link slangCharacter Character |
46763b01cd9a
commit https://github.com/vim/vim/commit/f37506f60f87d52a9e8850e30067645e2b13783c
Christian Brabandt <cb@256bit.org>
parents:
10048
diff
changeset
|
63 hi def link slangFloat Float |
46763b01cd9a
commit https://github.com/vim/vim/commit/f37506f60f87d52a9e8850e30067645e2b13783c
Christian Brabandt <cb@256bit.org>
parents:
10048
diff
changeset
|
64 hi def link slangImaginary Float |
46763b01cd9a
commit https://github.com/vim/vim/commit/f37506f60f87d52a9e8850e30067645e2b13783c
Christian Brabandt <cb@256bit.org>
parents:
10048
diff
changeset
|
65 hi def link slangDecimal slangNumber |
46763b01cd9a
commit https://github.com/vim/vim/commit/f37506f60f87d52a9e8850e30067645e2b13783c
Christian Brabandt <cb@256bit.org>
parents:
10048
diff
changeset
|
66 hi def link slangOctal slangNumber |
46763b01cd9a
commit https://github.com/vim/vim/commit/f37506f60f87d52a9e8850e30067645e2b13783c
Christian Brabandt <cb@256bit.org>
parents:
10048
diff
changeset
|
67 hi def link slangHex slangNumber |
46763b01cd9a
commit https://github.com/vim/vim/commit/f37506f60f87d52a9e8850e30067645e2b13783c
Christian Brabandt <cb@256bit.org>
parents:
10048
diff
changeset
|
68 hi def link slangNumber Number |
46763b01cd9a
commit https://github.com/vim/vim/commit/f37506f60f87d52a9e8850e30067645e2b13783c
Christian Brabandt <cb@256bit.org>
parents:
10048
diff
changeset
|
69 hi def link slangParenError Error |
46763b01cd9a
commit https://github.com/vim/vim/commit/f37506f60f87d52a9e8850e30067645e2b13783c
Christian Brabandt <cb@256bit.org>
parents:
10048
diff
changeset
|
70 hi def link slangOctalError Error |
46763b01cd9a
commit https://github.com/vim/vim/commit/f37506f60f87d52a9e8850e30067645e2b13783c
Christian Brabandt <cb@256bit.org>
parents:
10048
diff
changeset
|
71 hi def link slangOperator Operator |
46763b01cd9a
commit https://github.com/vim/vim/commit/f37506f60f87d52a9e8850e30067645e2b13783c
Christian Brabandt <cb@256bit.org>
parents:
10048
diff
changeset
|
72 hi def link slangStructure Structure |
46763b01cd9a
commit https://github.com/vim/vim/commit/f37506f60f87d52a9e8850e30067645e2b13783c
Christian Brabandt <cb@256bit.org>
parents:
10048
diff
changeset
|
73 hi def link slangInclude Include |
46763b01cd9a
commit https://github.com/vim/vim/commit/f37506f60f87d52a9e8850e30067645e2b13783c
Christian Brabandt <cb@256bit.org>
parents:
10048
diff
changeset
|
74 hi def link slangPreCondit PreCondit |
46763b01cd9a
commit https://github.com/vim/vim/commit/f37506f60f87d52a9e8850e30067645e2b13783c
Christian Brabandt <cb@256bit.org>
parents:
10048
diff
changeset
|
75 hi def link slangError Error |
46763b01cd9a
commit https://github.com/vim/vim/commit/f37506f60f87d52a9e8850e30067645e2b13783c
Christian Brabandt <cb@256bit.org>
parents:
10048
diff
changeset
|
76 hi def link slangStatement Statement |
46763b01cd9a
commit https://github.com/vim/vim/commit/f37506f60f87d52a9e8850e30067645e2b13783c
Christian Brabandt <cb@256bit.org>
parents:
10048
diff
changeset
|
77 hi def link slangType Type |
46763b01cd9a
commit https://github.com/vim/vim/commit/f37506f60f87d52a9e8850e30067645e2b13783c
Christian Brabandt <cb@256bit.org>
parents:
10048
diff
changeset
|
78 hi def link slangString String |
46763b01cd9a
commit https://github.com/vim/vim/commit/f37506f60f87d52a9e8850e30067645e2b13783c
Christian Brabandt <cb@256bit.org>
parents:
10048
diff
changeset
|
79 hi def link slangConstant Constant |
46763b01cd9a
commit https://github.com/vim/vim/commit/f37506f60f87d52a9e8850e30067645e2b13783c
Christian Brabandt <cb@256bit.org>
parents:
10048
diff
changeset
|
80 hi def link slangRangeArray slangConstant |
46763b01cd9a
commit https://github.com/vim/vim/commit/f37506f60f87d52a9e8850e30067645e2b13783c
Christian Brabandt <cb@256bit.org>
parents:
10048
diff
changeset
|
81 hi def link slangComment Comment |
46763b01cd9a
commit https://github.com/vim/vim/commit/f37506f60f87d52a9e8850e30067645e2b13783c
Christian Brabandt <cb@256bit.org>
parents:
10048
diff
changeset
|
82 hi def link slangSpecial SpecialChar |
46763b01cd9a
commit https://github.com/vim/vim/commit/f37506f60f87d52a9e8850e30067645e2b13783c
Christian Brabandt <cb@256bit.org>
parents:
10048
diff
changeset
|
83 hi def link slangTodo Todo |
46763b01cd9a
commit https://github.com/vim/vim/commit/f37506f60f87d52a9e8850e30067645e2b13783c
Christian Brabandt <cb@256bit.org>
parents:
10048
diff
changeset
|
84 hi def link slangDelim Delimiter |
7 | 85 |
86 | |
87 let b:current_syntax = "slang" | |
88 | |
89 " vim: ts=8 |