Mercurial > vim
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 |
rev | line source |
---|---|
7 | 1 " Vim syntax file |
2 " Language: sendmail | |
19180 | 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 | 5 " Version: 9 |
6479 | 6 " URL: http://www.drchip.org/astronaut/vim/index.html#SYNTAX_SM |
6484 | 7 if exists("b:current_syntax") |
7 | 8 finish |
9 endif | |
10 | |
11 " Comments | |
12 syn match smComment "^#.*$" contains=@Spell | |
13 | |
14 " Definitions, Classes, Files, Options, Precedence, Trusted Users, Mailers | |
15 syn match smDefine "^[CDF]." | |
16 syn match smDefine "^O[AaBcdDeFfgHiLmNoQqrSsTtuvxXyYzZ]" | |
17 syn match smDefine "^O\s"he=e-1 | |
18 syn match smDefine "^M[a-zA-Z0-9]\+,"he=e-1 | |
19 syn match smDefine "^T" nextgroup=smTrusted | |
20 syn match smDefine "^P" nextgroup=smMesg | |
21 syn match smTrusted "\S\+$" contained | |
22 syn match smMesg "\S*="he=e-1 contained nextgroup=smPrecedence | |
23 syn match smPrecedence "-\=[0-9]\+" contained | |
24 | |
25 " Header Format H?list-of-mailer-flags?name: format | |
26 syn match smHeaderSep contained "[?:]" | |
27 syn match smHeader "^H\(?[a-zA-Z]\+?\)\=[-a-zA-Z_]\+:" contains=smHeaderSep | |
28 | |
29 " Variables | |
30 syn match smVar "\$[a-z\.\|]" | |
31 | |
32 " Rulesets | |
33 syn match smRuleset "^S\d*" | |
34 | |
35 " Rewriting Rules | |
36 syn match smRewrite "^R" skipwhite nextgroup=smRewriteLhsToken,smRewriteLhsUser | |
37 | |
38 syn match smRewriteLhsUser contained "[^\t$]\+" skipwhite nextgroup=smRewriteLhsToken,smRewriteLhsSep | |
39 syn match smRewriteLhsToken contained "\(\$[-*+]\|\$[-=][A-Za-z]\|\$Y\)\+" skipwhite nextgroup=smRewriteLhsUser,smRewriteLhsSep | |
40 | |
41 syn match smRewriteLhsSep contained "\t\+" skipwhite nextgroup=smRewriteRhsToken,smRewriteRhsUser | |
42 | |
43 syn match smRewriteRhsUser contained "[^\t$]\+" skipwhite nextgroup=smRewriteRhsToken,smRewriteRhsSep | |
44 syn match smRewriteRhsToken contained "\(\$\d\|\$>\d\|\$#\|\$@\|\$:[-_a-zA-Z]\+\|\$[[\]]\|\$@\|\$:\|\$[A-Za-z]\)\+" skipwhite nextgroup=smRewriteRhsUser,smRewriteRhsSep | |
45 | |
46 syn match smRewriteRhsSep contained "\t\+" skipwhite nextgroup=smRewriteComment,smRewriteRhsSep | |
47 syn match smRewriteRhsSep contained "$" | |
48 | |
49 syn match smRewriteComment contained "[^\t$]*$" | |
50 | |
51 " Clauses | |
52 syn match smClauseError "\$\." | |
53 syn match smElse contained "\$|" | |
54 syn match smClauseCont contained "^\t" | |
55 syn region smClause matchgroup=Delimiter start="\$?." matchgroup=Delimiter end="\$\." contains=smElse,smClause,smVar,smClauseCont | |
56 | |
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 | 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 | 77 |
78 let b:current_syntax = "sm" | |
79 | |
80 " vim: ts=18 |