Mercurial > vim
comparison runtime/syntax/ayacc.vim @ 10048:43efa4f5a8ea
commit https://github.com/vim/vim/commit/89bcfda6834aba724d12554a34b9ed49f5789fd5
Author: Bram Moolenaar <Bram@vim.org>
Date: Tue Aug 30 23:26:57 2016 +0200
Updated runtime files. Remove version checks for Vim older than 6.0.
author | Christian Brabandt <cb@256bit.org> |
---|---|
date | Tue, 30 Aug 2016 23:30:09 +0200 |
parents | 91e53bcb7946 |
children | 46763b01cd9a |
comparison
equal
deleted
inserted
replaced
10047:a62862410ca1 | 10048:43efa4f5a8ea |
---|---|
4 " LastChange: 2011 Dec 25 | 4 " LastChange: 2011 Dec 25 |
5 " Original: Yacc, maintained by Dr. Charles E. Campbell, Jr. | 5 " Original: Yacc, maintained by Dr. Charles E. Campbell, Jr. |
6 " Comment: Replaced sourcing c.vim file by ada.vim and rename yacc* | 6 " Comment: Replaced sourcing c.vim file by ada.vim and rename yacc* |
7 " in ayacc* | 7 " in ayacc* |
8 | 8 |
9 " For version 5.x: Clear all syntax items | 9 " quit when a syntax file was already loaded |
10 " For version 6.x: Quit when a syntax file was already loaded | 10 if exists("b:current_syntax") |
11 if version < 600 | |
12 syntax clear | |
13 elseif exists("b:current_syntax") | |
14 finish | 11 finish |
15 endif | 12 endif |
16 | 13 |
17 " Read the Ada syntax to start with | 14 " Read the Ada syntax to start with |
18 if version < 600 | 15 runtime! syntax/ada.vim |
19 so <sfile>:p:h/ada.vim | 16 unlet b:current_syntax |
20 else | |
21 runtime! syntax/ada.vim | |
22 unlet b:current_syntax | |
23 endif | |
24 | 17 |
25 let s:cpo_save = &cpo | 18 let s:cpo_save = &cpo |
26 set cpo&vim | 19 set cpo&vim |
27 | 20 |
28 " Clusters | 21 " Clusters |
52 | 45 |
53 " I'd really like to highlight just the outer {}. Any suggestions??? | 46 " I'd really like to highlight just the outer {}. Any suggestions??? |
54 syn match ayaccCurlyError "[{}]" | 47 syn match ayaccCurlyError "[{}]" |
55 syn region ayaccAction matchgroup=ayaccCurly start="{" end="}" contains=ALLBUT,@ayaccActionGroup | 48 syn region ayaccAction matchgroup=ayaccCurly start="{" end="}" contains=ALLBUT,@ayaccActionGroup |
56 | 49 |
57 if version >= 508 || !exists("did_ayacc_syntax_inits") | 50 command -nargs=+ HiLink hi def link <args> |
58 if version < 508 | |
59 let did_ayacc_syntax_inits = 1 | |
60 command -nargs=+ HiLink hi link <args> | |
61 else | |
62 command -nargs=+ HiLink hi def link <args> | |
63 endif | |
64 | 51 |
65 " Internal ayacc highlighting links | 52 " Internal ayacc highlighting links |
66 HiLink ayaccBrkt ayaccStmt | 53 HiLink ayaccBrkt ayaccStmt |
67 HiLink ayaccKey ayaccStmt | 54 HiLink ayaccKey ayaccStmt |
68 HiLink ayaccOper ayaccStmt | 55 HiLink ayaccOper ayaccStmt |
69 HiLink ayaccUnionStart ayaccKey | 56 HiLink ayaccUnionStart ayaccKey |
70 | 57 |
71 " External ayacc highlighting links | 58 " External ayacc highlighting links |
72 HiLink ayaccCurly Delimiter | 59 HiLink ayaccCurly Delimiter |
73 HiLink ayaccCurlyError Error | 60 HiLink ayaccCurlyError Error |
74 HiLink ayaccDefinition Function | 61 HiLink ayaccDefinition Function |
75 HiLink ayaccDelim Function | 62 HiLink ayaccDelim Function |
76 HiLink ayaccKeyActn Special | 63 HiLink ayaccKeyActn Special |
77 HiLink ayaccSectionSep Todo | 64 HiLink ayaccSectionSep Todo |
78 HiLink ayaccSep Delimiter | 65 HiLink ayaccSep Delimiter |
79 HiLink ayaccStmt Statement | 66 HiLink ayaccStmt Statement |
80 HiLink ayaccType Type | 67 HiLink ayaccType Type |
81 | 68 |
82 " since Bram doesn't like my Delimiter :| | 69 " since Bram doesn't like my Delimiter :| |
83 HiLink Delimiter Type | 70 HiLink Delimiter Type |
84 delcommand HiLink | 71 delcommand HiLink |
85 endif | |
86 | 72 |
87 let b:current_syntax = "ayacc" | 73 let b:current_syntax = "ayacc" |
88 | 74 |
89 let &cpo = s:cpo_save | 75 let &cpo = s:cpo_save |
90 unlet s:cpo_save | 76 unlet s:cpo_save |