annotate runtime/syntax/sm.vim @ 23923:be36288235af v8.2.2504

patch 8.2.2504: Vim9: crash when using an argument from a closure Commit: https://github.com/vim/vim/commit/44ec21c467ddf481b422c787324ea08f375f6942 Author: Bram Moolenaar <Bram@vim.org> Date: Fri Feb 12 21:50:57 2021 +0100 patch 8.2.2504: Vim9: crash when using an argument from a closure Problem: Vim9: crash when using an argument from a closure. Solution: Check if gen_load_outer is NULL. (closes https://github.com/vim/vim/issues/7821)
author Bram Moolenaar <Bram@vim.org>
date Fri, 12 Feb 2021 22:00:04 +0100
parents 8edf0aeb71b9
children 02bd0fe77c68
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: sendmail
19180
8edf0aeb71b9 Update runtime files.
Bram Moolenaar <Bram@vim.org>
parents: 10306
diff changeset
3 " Maintainer: Charles E. Campbell <NcampObell@SdrPchip.AorgM-NOSPAM>
10306
d75e2380db0e commit https://github.com/vim/vim/commit/6d5ad4c4118cab5fd96db157621c3aa9af368edb
Christian Brabandt <cb@256bit.org>
parents: 10051
diff changeset
4 " Last Change: Oct 25, 2016
19180
8edf0aeb71b9 Update runtime files.
Bram Moolenaar <Bram@vim.org>
parents: 10306
diff changeset
5 " Version: 9
6479
b3bc99b909c3 Updated syntax files.
Bram Moolenaar <bram@vim.org>
parents: 507
diff changeset
6 " URL: http://www.drchip.org/astronaut/vim/index.html#SYNTAX_SM
6484
ce4ecfbebded Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents: 6479
diff changeset
7 if exists("b:current_syntax")
7
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
8 finish
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
9 endif
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
10
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
11 " Comments
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
12 syn match smComment "^#.*$" contains=@Spell
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
13
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
14 " Definitions, Classes, Files, Options, Precedence, Trusted Users, Mailers
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
15 syn match smDefine "^[CDF]."
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
16 syn match smDefine "^O[AaBcdDeFfgHiLmNoQqrSsTtuvxXyYzZ]"
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
17 syn match smDefine "^O\s"he=e-1
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
18 syn match smDefine "^M[a-zA-Z0-9]\+,"he=e-1
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
19 syn match smDefine "^T" nextgroup=smTrusted
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
20 syn match smDefine "^P" nextgroup=smMesg
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
21 syn match smTrusted "\S\+$" contained
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
22 syn match smMesg "\S*="he=e-1 contained nextgroup=smPrecedence
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
23 syn match smPrecedence "-\=[0-9]\+" contained
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
24
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
25 " Header Format H?list-of-mailer-flags?name: format
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
26 syn match smHeaderSep contained "[?:]"
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
27 syn match smHeader "^H\(?[a-zA-Z]\+?\)\=[-a-zA-Z_]\+:" contains=smHeaderSep
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
28
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
29 " Variables
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
30 syn match smVar "\$[a-z\.\|]"
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
31
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
32 " Rulesets
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
33 syn match smRuleset "^S\d*"
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
34
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
35 " Rewriting Rules
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
36 syn match smRewrite "^R" skipwhite nextgroup=smRewriteLhsToken,smRewriteLhsUser
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
37
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
38 syn match smRewriteLhsUser contained "[^\t$]\+" skipwhite nextgroup=smRewriteLhsToken,smRewriteLhsSep
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
39 syn match smRewriteLhsToken contained "\(\$[-*+]\|\$[-=][A-Za-z]\|\$Y\)\+" skipwhite nextgroup=smRewriteLhsUser,smRewriteLhsSep
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
40
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
41 syn match smRewriteLhsSep contained "\t\+" skipwhite nextgroup=smRewriteRhsToken,smRewriteRhsUser
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
42
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
43 syn match smRewriteRhsUser contained "[^\t$]\+" skipwhite nextgroup=smRewriteRhsToken,smRewriteRhsSep
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
44 syn match smRewriteRhsToken contained "\(\$\d\|\$>\d\|\$#\|\$@\|\$:[-_a-zA-Z]\+\|\$[[\]]\|\$@\|\$:\|\$[A-Za-z]\)\+" skipwhite nextgroup=smRewriteRhsUser,smRewriteRhsSep
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
45
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
46 syn match smRewriteRhsSep contained "\t\+" skipwhite nextgroup=smRewriteComment,smRewriteRhsSep
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
47 syn match smRewriteRhsSep contained "$"
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
48
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
49 syn match smRewriteComment contained "[^\t$]*$"
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
50
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
51 " Clauses
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
52 syn match smClauseError "\$\."
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
53 syn match smElse contained "\$|"
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
54 syn match smClauseCont contained "^\t"
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
55 syn region smClause matchgroup=Delimiter start="\$?." matchgroup=Delimiter end="\$\." contains=smElse,smClause,smVar,smClauseCont
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.
10048
43efa4f5a8ea commit https://github.com/vim/vim/commit/89bcfda6834aba724d12554a34b9ed49f5789fd5
Christian Brabandt <cb@256bit.org>
parents: 6744
diff changeset
58 " Only when an item doesn't have highlighting yet
7
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
59
10051
46763b01cd9a commit https://github.com/vim/vim/commit/f37506f60f87d52a9e8850e30067645e2b13783c
Christian Brabandt <cb@256bit.org>
parents: 10048
diff changeset
60 hi def link smClause Special
46763b01cd9a commit https://github.com/vim/vim/commit/f37506f60f87d52a9e8850e30067645e2b13783c
Christian Brabandt <cb@256bit.org>
parents: 10048
diff changeset
61 hi def link smClauseError Error
46763b01cd9a commit https://github.com/vim/vim/commit/f37506f60f87d52a9e8850e30067645e2b13783c
Christian Brabandt <cb@256bit.org>
parents: 10048
diff changeset
62 hi def link smComment Comment
46763b01cd9a commit https://github.com/vim/vim/commit/f37506f60f87d52a9e8850e30067645e2b13783c
Christian Brabandt <cb@256bit.org>
parents: 10048
diff changeset
63 hi def link smDefine Statement
10306
d75e2380db0e commit https://github.com/vim/vim/commit/6d5ad4c4118cab5fd96db157621c3aa9af368edb
Christian Brabandt <cb@256bit.org>
parents: 10051
diff changeset
64 hi def link smElse Delimiter
10051
46763b01cd9a commit https://github.com/vim/vim/commit/f37506f60f87d52a9e8850e30067645e2b13783c
Christian Brabandt <cb@256bit.org>
parents: 10048
diff changeset
65 hi def link smHeader Statement
46763b01cd9a commit https://github.com/vim/vim/commit/f37506f60f87d52a9e8850e30067645e2b13783c
Christian Brabandt <cb@256bit.org>
parents: 10048
diff changeset
66 hi def link smHeaderSep String
10306
d75e2380db0e commit https://github.com/vim/vim/commit/6d5ad4c4118cab5fd96db157621c3aa9af368edb
Christian Brabandt <cb@256bit.org>
parents: 10051
diff changeset
67 hi def link smMesg Special
10051
46763b01cd9a commit https://github.com/vim/vim/commit/f37506f60f87d52a9e8850e30067645e2b13783c
Christian Brabandt <cb@256bit.org>
parents: 10048
diff changeset
68 hi def link smPrecedence Number
46763b01cd9a commit https://github.com/vim/vim/commit/f37506f60f87d52a9e8850e30067645e2b13783c
Christian Brabandt <cb@256bit.org>
parents: 10048
diff changeset
69 hi def link smRewrite Statement
46763b01cd9a commit https://github.com/vim/vim/commit/f37506f60f87d52a9e8850e30067645e2b13783c
Christian Brabandt <cb@256bit.org>
parents: 10048
diff changeset
70 hi def link smRewriteComment Comment
46763b01cd9a commit https://github.com/vim/vim/commit/f37506f60f87d52a9e8850e30067645e2b13783c
Christian Brabandt <cb@256bit.org>
parents: 10048
diff changeset
71 hi def link smRewriteLhsToken String
46763b01cd9a commit https://github.com/vim/vim/commit/f37506f60f87d52a9e8850e30067645e2b13783c
Christian Brabandt <cb@256bit.org>
parents: 10048
diff changeset
72 hi def link smRewriteLhsUser Statement
46763b01cd9a commit https://github.com/vim/vim/commit/f37506f60f87d52a9e8850e30067645e2b13783c
Christian Brabandt <cb@256bit.org>
parents: 10048
diff changeset
73 hi def link smRewriteRhsToken String
46763b01cd9a commit https://github.com/vim/vim/commit/f37506f60f87d52a9e8850e30067645e2b13783c
Christian Brabandt <cb@256bit.org>
parents: 10048
diff changeset
74 hi def link smRuleset Preproc
46763b01cd9a commit https://github.com/vim/vim/commit/f37506f60f87d52a9e8850e30067645e2b13783c
Christian Brabandt <cb@256bit.org>
parents: 10048
diff changeset
75 hi def link smTrusted Special
46763b01cd9a commit https://github.com/vim/vim/commit/f37506f60f87d52a9e8850e30067645e2b13783c
Christian Brabandt <cb@256bit.org>
parents: 10048
diff changeset
76 hi def link smVar String
7
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
77
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
78 let b:current_syntax = "sm"
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
79
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
80 " vim: ts=18