annotate runtime/syntax/asn.vim @ 30092:53e7e912eeec v9.0.0382

patch 9.0.0382: freeing the wrong string on failure Commit: https://github.com/vim/vim/commit/31ea6bf530a814991f669122dbc9921117a862c3 Author: Bram Moolenaar <Bram@vim.org> Date: Mon Sep 5 10:47:13 2022 +0100 patch 9.0.0382: freeing the wrong string on failure Problem: Freeing the wrong string on failure. Solution: Adjust the argument. Reorder the code.
author Bram Moolenaar <Bram@vim.org>
date Mon, 05 Sep 2022 12:00:06 +0200
parents 46763b01cd9a
children
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: ASN.1
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
3 " Maintainer: Claudio Fleiner <claudio@fleiner.com>
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
4 " URL: http://www.fleiner.com/vim/syntax/asn.vim
3854
aa51675adf7e Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents: 7
diff changeset
5 " Last Change: 2012 Oct 05
7
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
6
10048
43efa4f5a8ea commit https://github.com/vim/vim/commit/89bcfda6834aba724d12554a34b9ed49f5789fd5
Christian Brabandt <cb@256bit.org>
parents: 3854
diff changeset
7 " quit when a syntax file was already loaded
43efa4f5a8ea commit https://github.com/vim/vim/commit/89bcfda6834aba724d12554a34b9ed49f5789fd5
Christian Brabandt <cb@256bit.org>
parents: 3854
diff changeset
8 if exists("b:current_syntax")
7
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
9 finish
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
10 endif
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
11
3854
aa51675adf7e Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents: 7
diff changeset
12 let s:cpo_save = &cpo
aa51675adf7e Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents: 7
diff changeset
13 set cpo&vim
aa51675adf7e Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents: 7
diff changeset
14
7
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
15 " keyword definitions
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
16 syn keyword asnExternal DEFINITIONS BEGIN END IMPORTS EXPORTS FROM
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
17 syn match asnExternal "\<IMPLICIT\s\+TAGS\>"
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
18 syn match asnExternal "\<EXPLICIT\s\+TAGS\>"
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
19 syn keyword asnFieldOption DEFAULT OPTIONAL
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
20 syn keyword asnTagModifier IMPLICIT EXPLICIT
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
21 syn keyword asnTypeInfo ABSENT PRESENT SIZE UNIVERSAL APPLICATION PRIVATE
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
22 syn keyword asnBoolValue TRUE FALSE
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
23 syn keyword asnNumber MIN MAX
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
24 syn match asnNumber "\<PLUS-INFINITY\>"
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
25 syn match asnNumber "\<MINUS-INFINITY\>"
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
26 syn keyword asnType INTEGER REAL STRING BIT BOOLEAN OCTET NULL EMBEDDED PDV
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
27 syn keyword asnType BMPString IA5String TeletexString GeneralString GraphicString ISO646String NumericString PrintableString T61String UniversalString VideotexString VisibleString
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
28 syn keyword asnType ANY DEFINED
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
29 syn match asnType "\.\.\."
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
30 syn match asnType "OBJECT\s\+IDENTIFIER"
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
31 syn match asnType "TYPE-IDENTIFIER"
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
32 syn keyword asnType UTF8String
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
33 syn keyword asnStructure CHOICE SEQUENCE SET OF ENUMERATED CONSTRAINED BY WITH COMPONENTS CLASS
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
34
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
35 " Strings and constants
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
36 syn match asnSpecial contained "\\\d\d\d\|\\."
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
37 syn region asnString start=+"+ skip=+\\\\\|\\"+ end=+"+ contains=asnSpecial
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
38 syn match asnCharacter "'[^\\]'"
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
39 syn match asnSpecialCharacter "'\\.'"
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
40 syn match asnNumber "-\=\<\d\+L\=\>\|0[xX][0-9a-fA-F]\+\>"
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
41 syn match asnLineComment "--.*"
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
42 syn match asnLineComment "--.*--"
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
43
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
44 syn match asnDefinition "^\s*[a-zA-Z][-a-zA-Z0-9_.\[\] \t{}]* *::="me=e-3 contains=asnType
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
45 syn match asnBraces "[{}]"
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
46
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
47 syn sync ccomment asnComment
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
48
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
49 " Define the default highlighting.
10048
43efa4f5a8ea commit https://github.com/vim/vim/commit/89bcfda6834aba724d12554a34b9ed49f5789fd5
Christian Brabandt <cb@256bit.org>
parents: 3854
diff changeset
50 " Only when an item doesn't have highlighting yet
10051
46763b01cd9a commit https://github.com/vim/vim/commit/f37506f60f87d52a9e8850e30067645e2b13783c
Christian Brabandt <cb@256bit.org>
parents: 10048
diff changeset
51 hi def link asnDefinition Function
46763b01cd9a commit https://github.com/vim/vim/commit/f37506f60f87d52a9e8850e30067645e2b13783c
Christian Brabandt <cb@256bit.org>
parents: 10048
diff changeset
52 hi def link asnBraces Function
46763b01cd9a commit https://github.com/vim/vim/commit/f37506f60f87d52a9e8850e30067645e2b13783c
Christian Brabandt <cb@256bit.org>
parents: 10048
diff changeset
53 hi def link asnStructure Statement
46763b01cd9a commit https://github.com/vim/vim/commit/f37506f60f87d52a9e8850e30067645e2b13783c
Christian Brabandt <cb@256bit.org>
parents: 10048
diff changeset
54 hi def link asnBoolValue Boolean
46763b01cd9a commit https://github.com/vim/vim/commit/f37506f60f87d52a9e8850e30067645e2b13783c
Christian Brabandt <cb@256bit.org>
parents: 10048
diff changeset
55 hi def link asnSpecial Special
46763b01cd9a commit https://github.com/vim/vim/commit/f37506f60f87d52a9e8850e30067645e2b13783c
Christian Brabandt <cb@256bit.org>
parents: 10048
diff changeset
56 hi def link asnString String
46763b01cd9a commit https://github.com/vim/vim/commit/f37506f60f87d52a9e8850e30067645e2b13783c
Christian Brabandt <cb@256bit.org>
parents: 10048
diff changeset
57 hi def link asnCharacter Character
46763b01cd9a commit https://github.com/vim/vim/commit/f37506f60f87d52a9e8850e30067645e2b13783c
Christian Brabandt <cb@256bit.org>
parents: 10048
diff changeset
58 hi def link asnSpecialCharacter asnSpecial
46763b01cd9a commit https://github.com/vim/vim/commit/f37506f60f87d52a9e8850e30067645e2b13783c
Christian Brabandt <cb@256bit.org>
parents: 10048
diff changeset
59 hi def link asnNumber asnValue
46763b01cd9a commit https://github.com/vim/vim/commit/f37506f60f87d52a9e8850e30067645e2b13783c
Christian Brabandt <cb@256bit.org>
parents: 10048
diff changeset
60 hi def link asnComment Comment
46763b01cd9a commit https://github.com/vim/vim/commit/f37506f60f87d52a9e8850e30067645e2b13783c
Christian Brabandt <cb@256bit.org>
parents: 10048
diff changeset
61 hi def link asnLineComment asnComment
46763b01cd9a commit https://github.com/vim/vim/commit/f37506f60f87d52a9e8850e30067645e2b13783c
Christian Brabandt <cb@256bit.org>
parents: 10048
diff changeset
62 hi def link asnType Type
46763b01cd9a commit https://github.com/vim/vim/commit/f37506f60f87d52a9e8850e30067645e2b13783c
Christian Brabandt <cb@256bit.org>
parents: 10048
diff changeset
63 hi def link asnTypeInfo PreProc
46763b01cd9a commit https://github.com/vim/vim/commit/f37506f60f87d52a9e8850e30067645e2b13783c
Christian Brabandt <cb@256bit.org>
parents: 10048
diff changeset
64 hi def link asnValue Number
46763b01cd9a commit https://github.com/vim/vim/commit/f37506f60f87d52a9e8850e30067645e2b13783c
Christian Brabandt <cb@256bit.org>
parents: 10048
diff changeset
65 hi def link asnExternal Include
46763b01cd9a commit https://github.com/vim/vim/commit/f37506f60f87d52a9e8850e30067645e2b13783c
Christian Brabandt <cb@256bit.org>
parents: 10048
diff changeset
66 hi def link asnTagModifier Function
46763b01cd9a commit https://github.com/vim/vim/commit/f37506f60f87d52a9e8850e30067645e2b13783c
Christian Brabandt <cb@256bit.org>
parents: 10048
diff changeset
67 hi def link asnFieldOption Type
7
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
68
3854
aa51675adf7e Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents: 7
diff changeset
69 let &cpo = s:cpo_save
aa51675adf7e Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents: 7
diff changeset
70 unlet s:cpo_save
7
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
71 let b:current_syntax = "asn"
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
72
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
73 " vim: ts=8