Mercurial > vim
annotate runtime/syntax/bc.vim @ 21996:808edde1e97d v8.2.1547
patch 8.2.1547: various comment problems
Commit: https://github.com/vim/vim/commit/02c037a4be6aeb7f6376e7dcc3ab41cfc6db3ede
Author: Bram Moolenaar <Bram@vim.org>
Date: Sun Aug 30 19:26:45 2020 +0200
patch 8.2.1547: various comment problems
Problem: Various comment problems.
Solution: Update comments.
author | Bram Moolenaar <Bram@vim.org> |
---|---|
date | Sun, 30 Aug 2020 19:30:13 +0200 |
parents | 46763b01cd9a |
children |
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 |
7 | 54 |
10051
46763b01cd9a
commit https://github.com/vim/vim/commit/f37506f60f87d52a9e8850e30067645e2b13783c
Christian Brabandt <cb@256bit.org>
parents:
10048
diff
changeset
|
55 hi def link bcKeyword Statement |
46763b01cd9a
commit https://github.com/vim/vim/commit/f37506f60f87d52a9e8850e30067645e2b13783c
Christian Brabandt <cb@256bit.org>
parents:
10048
diff
changeset
|
56 hi def link bcType Type |
46763b01cd9a
commit https://github.com/vim/vim/commit/f37506f60f87d52a9e8850e30067645e2b13783c
Christian Brabandt <cb@256bit.org>
parents:
10048
diff
changeset
|
57 hi def link bcConstant Constant |
46763b01cd9a
commit https://github.com/vim/vim/commit/f37506f60f87d52a9e8850e30067645e2b13783c
Christian Brabandt <cb@256bit.org>
parents:
10048
diff
changeset
|
58 hi def link bcNumber Number |
46763b01cd9a
commit https://github.com/vim/vim/commit/f37506f60f87d52a9e8850e30067645e2b13783c
Christian Brabandt <cb@256bit.org>
parents:
10048
diff
changeset
|
59 hi def link bcComment Comment |
46763b01cd9a
commit https://github.com/vim/vim/commit/f37506f60f87d52a9e8850e30067645e2b13783c
Christian Brabandt <cb@256bit.org>
parents:
10048
diff
changeset
|
60 hi def link bcString String |
46763b01cd9a
commit https://github.com/vim/vim/commit/f37506f60f87d52a9e8850e30067645e2b13783c
Christian Brabandt <cb@256bit.org>
parents:
10048
diff
changeset
|
61 hi def link bcSpecialChar SpecialChar |
46763b01cd9a
commit https://github.com/vim/vim/commit/f37506f60f87d52a9e8850e30067645e2b13783c
Christian Brabandt <cb@256bit.org>
parents:
10048
diff
changeset
|
62 hi def link bcParenError Error |
7 | 63 |
64 | |
65 let b:current_syntax = "bc" | |
66 " vim: ts=8 |