Mercurial > vim
annotate runtime/syntax/bc.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 | 9cb3a75a20b9 |
children | 46763b01cd9a |
rev | line source |
---|---|
7 | 1 " Vim syntax file |
2 " Language: bc - An arbitrary precision calculator language | |
3 " Maintainer: Vladimir Scholtz <vlado@gjh.sk> | |
3557 | 4 " Last change: 2012 Jun 01 |
5 " (Dominique Pelle added @Spell) | |
7 | 6 " Available on: www.gjh.sk/~vlado/bc.vim |
7 | |
10048
43efa4f5a8ea
commit https://github.com/vim/vim/commit/89bcfda6834aba724d12554a34b9ed49f5789fd5
Christian Brabandt <cb@256bit.org>
parents:
3557
diff
changeset
|
8 " quit when a syntax file was already loaded |
43efa4f5a8ea
commit https://github.com/vim/vim/commit/89bcfda6834aba724d12554a34b9ed49f5789fd5
Christian Brabandt <cb@256bit.org>
parents:
3557
diff
changeset
|
9 if exists("b:current_syntax") |
7 | 10 finish |
11 endif | |
12 | |
13 syn case ignore | |
14 | |
15 " Keywords | |
16 syn keyword bcKeyword if else while for break continue return limits halt quit | |
17 syn keyword bcKeyword define | |
18 syn keyword bcKeyword length read sqrt print | |
19 | |
20 " Variable | |
21 syn keyword bcType auto | |
22 | |
23 " Constant | |
24 syn keyword bcConstant scale ibase obase last | |
25 syn keyword bcConstant BC_BASE_MAX BC_DIM_MAX BC_SCALE_MAX BC_STRING_MAX | |
26 syn keyword bcConstant BC_ENV_ARGS BC_LINE_LENGTH | |
27 | |
28 " Any other stuff | |
29 syn match bcIdentifier "[a-z_][a-z0-9_]*" | |
30 | |
31 " String | |
3557 | 32 syn match bcString "\"[^"]*\"" contains=@Spell |
7 | 33 |
34 " Number | |
35 syn match bcNumber "[0-9]\+" | |
36 | |
37 " Comment | |
3557 | 38 syn match bcComment "\#.*" contains=@Spell |
39 syn region bcComment start="/\*" end="\*/" contains=@Spell | |
7 | 40 |
41 " Parent () | |
42 syn cluster bcAll contains=bcList,bcIdentifier,bcNumber,bcKeyword,bcType,bcConstant,bcString,bcParentError | |
43 syn region bcList matchgroup=Delimiter start="(" skip="|.\{-}|" matchgroup=Delimiter end=")" contains=@bcAll | |
44 syn region bcList matchgroup=Delimiter start="\[" skip="|.\{-}|" matchgroup=Delimiter end="\]" contains=@bcAll | |
45 syn match bcParenError "]" | |
46 syn match bcParenError ")" | |
47 | |
48 | |
49 | |
50 syn case match | |
51 | |
52 " Define the default highlighting. | |
10048
43efa4f5a8ea
commit https://github.com/vim/vim/commit/89bcfda6834aba724d12554a34b9ed49f5789fd5
Christian Brabandt <cb@256bit.org>
parents:
3557
diff
changeset
|
53 " Only when an item doesn't have highlighting yet |
43efa4f5a8ea
commit https://github.com/vim/vim/commit/89bcfda6834aba724d12554a34b9ed49f5789fd5
Christian Brabandt <cb@256bit.org>
parents:
3557
diff
changeset
|
54 command -nargs=+ HiLink hi def link <args> |
7 | 55 |
10048
43efa4f5a8ea
commit https://github.com/vim/vim/commit/89bcfda6834aba724d12554a34b9ed49f5789fd5
Christian Brabandt <cb@256bit.org>
parents:
3557
diff
changeset
|
56 HiLink bcKeyword Statement |
43efa4f5a8ea
commit https://github.com/vim/vim/commit/89bcfda6834aba724d12554a34b9ed49f5789fd5
Christian Brabandt <cb@256bit.org>
parents:
3557
diff
changeset
|
57 HiLink bcType Type |
43efa4f5a8ea
commit https://github.com/vim/vim/commit/89bcfda6834aba724d12554a34b9ed49f5789fd5
Christian Brabandt <cb@256bit.org>
parents:
3557
diff
changeset
|
58 HiLink bcConstant Constant |
43efa4f5a8ea
commit https://github.com/vim/vim/commit/89bcfda6834aba724d12554a34b9ed49f5789fd5
Christian Brabandt <cb@256bit.org>
parents:
3557
diff
changeset
|
59 HiLink bcNumber Number |
43efa4f5a8ea
commit https://github.com/vim/vim/commit/89bcfda6834aba724d12554a34b9ed49f5789fd5
Christian Brabandt <cb@256bit.org>
parents:
3557
diff
changeset
|
60 HiLink bcComment Comment |
43efa4f5a8ea
commit https://github.com/vim/vim/commit/89bcfda6834aba724d12554a34b9ed49f5789fd5
Christian Brabandt <cb@256bit.org>
parents:
3557
diff
changeset
|
61 HiLink bcString String |
43efa4f5a8ea
commit https://github.com/vim/vim/commit/89bcfda6834aba724d12554a34b9ed49f5789fd5
Christian Brabandt <cb@256bit.org>
parents:
3557
diff
changeset
|
62 HiLink bcSpecialChar SpecialChar |
43efa4f5a8ea
commit https://github.com/vim/vim/commit/89bcfda6834aba724d12554a34b9ed49f5789fd5
Christian Brabandt <cb@256bit.org>
parents:
3557
diff
changeset
|
63 HiLink bcParenError Error |
7 | 64 |
10048
43efa4f5a8ea
commit https://github.com/vim/vim/commit/89bcfda6834aba724d12554a34b9ed49f5789fd5
Christian Brabandt <cb@256bit.org>
parents:
3557
diff
changeset
|
65 delcommand HiLink |
7 | 66 |
67 let b:current_syntax = "bc" | |
68 " vim: ts=8 |