annotate runtime/syntax/slang.vim @ 9707:be4aaef2651c v7.4.2129

commit https://github.com/vim/vim/commit/3ab14355ed93958433eec58e96ec9bd9a472f2b2 Author: Bram Moolenaar <Bram@vim.org> Date: Sat Jul 30 22:32:11 2016 +0200 patch 7.4.2129 Problem: Memory leak when using timer_start(). (Dominique Pelle) Solution: Don't copy the callback when using a partial.
author Christian Brabandt <cb@256bit.org>
date Sat, 30 Jul 2016 22:45:04 +0200
parents 3fc0f57ecb91
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: S-Lang
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
3 " Maintainer: Jan Hlavacek <lahvak@math.ohio-state.edu>
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
4 " Last Change: 980216
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
5
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
6 " For version 5.x: Clear all syntax items
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
7 " For version 6.x: Quit when a syntax file was already loaded
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
8 if version < 600
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
9 syntax clear
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
10 elseif exists("b:current_syntax")
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
11 finish
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
12 endif
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
13
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
14 syn keyword slangStatement break return continue EXECUTE_ERROR_BLOCK
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
15 syn match slangStatement "\<X_USER_BLOCK[0-4]\>"
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
16 syn keyword slangLabel case
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
17 syn keyword slangConditional !if if else switch
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
18 syn keyword slangRepeat while for _for loop do forever
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
19 syn keyword slangDefinition define typedef variable struct
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
20 syn keyword slangOperator or and andelse orelse shr shl xor not
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
21 syn keyword slangBlock EXIT_BLOCK ERROR_BLOCK
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
22 syn match slangBlock "\<USER_BLOCK[0-4]\>"
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
23 syn keyword slangConstant NULL
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
24 syn keyword slangType Integer_Type Double_Type Complex_Type String_Type Struct_Type Ref_Type Null_Type Array_Type DataType_Type
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
25
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
26 syn match slangOctal "\<0\d\+\>" contains=slangOctalError
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
27 syn match slangOctalError "[89]\+" contained
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
28 syn match slangHex "\<0[xX][0-9A-Fa-f]*\>"
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
29 syn match slangDecimal "\<[1-9]\d*\>"
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
30 syn match slangFloat "\<\d\+\."
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
31 syn match slangFloat "\<\d\+\.\d\+\([Ee][-+]\=\d\+\)\=\>"
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
32 syn match slangFloat "\<\d\+\.[Ee][-+]\=\d\+\>"
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
33 syn match slangFloat "\<\d\+[Ee][-+]\=\d\+\>"
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
34 syn match slangFloat "\.\d\+\([Ee][-+]\=\d\+\)\=\>"
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
35 syn match slangImaginary "\.\d\+\([Ee][-+]\=\d*\)\=[ij]\>"
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
36 syn match slangImaginary "\<\d\+\(\.\d*\)\=\([Ee][-+]\=\d\+\)\=[ij]\>"
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
37
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
38 syn region slangString oneline start='"' end='"' skip='\\"'
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
39 syn match slangCharacter "'[^\\]'"
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
40 syn match slangCharacter "'\\.'"
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
41 syn match slangCharacter "'\\[0-7]\{1,3}'"
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
42 syn match slangCharacter "'\\d\d\{1,3}'"
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
43 syn match slangCharacter "'\\x[0-7a-fA-F]\{1,2}'"
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
44
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
45 syn match slangDelim "[][{};:,]"
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
46 syn match slangOperator "[-%+/&*=<>|!~^@]"
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
47
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
48 "catch errors caused by wrong parenthesis
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
49 syn region slangParen matchgroup=slangDelim transparent start='(' end=')' contains=ALLBUT,slangParenError
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
50 syn match slangParenError ")"
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
51
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
52 syn match slangComment "%.*$"
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
53 syn keyword slangOperator sizeof
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
54
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
55 syn region slangPreCondit start="^\s*#\s*\(ifdef\>\|ifndef\>\|iftrue\>\|ifnfalse\>\|iffalse\>\|ifntrue\>\|if\$\|ifn\$\|\|elif\>\|else\>\|endif\>\)" skip="\\$" end="$" contains=cComment,slangString,slangCharacter,slangNumber
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
56
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
57 " Define the default highlighting.
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
58 " For version 5.7 and earlier: only when not done already
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
59 " 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
60 if version >= 508 || !exists("did_slang_syntax_inits")
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
61 if version < 508
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
62 let did_slang_syntax_inits = 1
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
63 command -nargs=+ HiLink hi link <args>
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
64 else
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
65 command -nargs=+ HiLink hi def link <args>
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
66 endif
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
67
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
68 HiLink slangDefinition Type
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
69 HiLink slangBlock slangDefinition
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
70 HiLink slangLabel Label
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
71 HiLink slangConditional Conditional
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
72 HiLink slangRepeat Repeat
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
73 HiLink slangCharacter Character
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
74 HiLink slangFloat Float
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
75 HiLink slangImaginary Float
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
76 HiLink slangDecimal slangNumber
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
77 HiLink slangOctal slangNumber
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
78 HiLink slangHex slangNumber
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
79 HiLink slangNumber Number
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
80 HiLink slangParenError Error
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
81 HiLink slangOctalError Error
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
82 HiLink slangOperator Operator
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
83 HiLink slangStructure Structure
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
84 HiLink slangInclude Include
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
85 HiLink slangPreCondit PreCondit
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
86 HiLink slangError Error
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
87 HiLink slangStatement Statement
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
88 HiLink slangType Type
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
89 HiLink slangString String
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
90 HiLink slangConstant Constant
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
91 HiLink slangRangeArray slangConstant
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
92 HiLink slangComment Comment
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
93 HiLink slangSpecial SpecialChar
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
94 HiLink slangTodo Todo
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
95 HiLink slangDelim Delimiter
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
96
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
97 delcommand HiLink
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
98 endif
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
99
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
100 let b:current_syntax = "slang"
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
101
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
102 " vim: ts=8