Mercurial > vim
annotate runtime/syntax/dcd.vim @ 34468:f5d114f7440e
runtime(java): Recognise text blocks (#14128)
Commit: https://github.com/vim/vim/commit/b3030b653bbdc08c91138001d1987d804f6ebf46
Author: Aliaksei Budavei <32549825+zzzyxwvut@users.noreply.github.com>
Date: Sun Mar 3 17:51:01 2024 +0300
runtime(java): Recognise text blocks (https://github.com/vim/vim/issues/14128)
Also, accept as valid the space escape sequence `\s`.
Also, consistently use the claimed `javaDebug` prefix for
syntax group definitions kept under `g:java_highlight_debug`.
Since `javaStringError` is commented out for its generality,
let's comment out `javaDebugStringError`, its copy, as well.
References:
https://openjdk.org/jeps/378
https://docs.oracle.com/javase/specs/jls/se17/html/jls-3.html#jls-3.10.7
Closes #10910.
Signed-off-by: Aliaksei Budavei <0x000c70@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
author | Christian Brabandt <cb@256bit.org> |
---|---|
date | Sun, 03 Mar 2024 16:00:10 +0100 |
parents | 46763b01cd9a |
children |
rev | line source |
---|---|
7 | 1 " Vim syntax file |
2 " Language: WildPackets EtherPeek Decoder (.dcd) file | |
3 " Maintainer: Christopher Shinn <christopher@lucent.com> | |
4 " Last Change: 2003 Apr 25 | |
5 | |
10048
43efa4f5a8ea
commit https://github.com/vim/vim/commit/89bcfda6834aba724d12554a34b9ed49f5789fd5
Christian Brabandt <cb@256bit.org>
parents:
7
diff
changeset
|
6 " quit when a syntax file was already loaded |
43efa4f5a8ea
commit https://github.com/vim/vim/commit/89bcfda6834aba724d12554a34b9ed49f5789fd5
Christian Brabandt <cb@256bit.org>
parents:
7
diff
changeset
|
7 if exists("b:current_syntax") |
7 | 8 finish |
9 endif | |
10 | |
11 " Keywords | |
12 syn keyword dcdFunction DCod TRTS TNXT CRLF | |
13 syn match dcdFunction display "\(STR\)\#" | |
14 syn keyword dcdLabel LABL | |
15 syn region dcdLabel start="[A-Z]" end=";" | |
16 syn keyword dcdConditional CEQU CNEQ CGTE CLTE CBIT CLSE | |
17 syn keyword dcdConditional LSTS LSTE LSTZ | |
18 syn keyword dcdConditional TYPE TTST TEQU TNEQ TGTE TLTE TBIT TLSE TSUB SKIP | |
19 syn keyword dcdConditional MARK WHOA | |
20 syn keyword dcdConditional SEQU SNEQ SGTE SLTE SBIT | |
21 syn match dcdConditional display "\(CST\)\#" "\(TST\)\#" | |
22 syn keyword dcdDisplay HBIT DBIT BBIT | |
23 syn keyword dcdDisplay HBYT DBYT BBYT | |
24 syn keyword dcdDisplay HWRD DWRD BWRD | |
25 syn keyword dcdDisplay HLNG DLNG BLNG | |
26 syn keyword dcdDisplay D64B | |
27 syn match dcdDisplay display "\(HEX\)\#" "\(CHR\)\#" "\(EBC\)\#" | |
28 syn keyword dcdDisplay HGLB DGLB BGLB | |
29 syn keyword dcdDisplay DUMP | |
30 syn keyword dcdStatement IPLG IPV6 ATLG AT03 AT01 ETHR TRNG PRTO PORT | |
31 syn keyword dcdStatement TIME OSTP PSTR CSTR NBNM DMPE FTPL CKSM FCSC | |
32 syn keyword dcdStatement GBIT GBYT GWRD GLNG | |
33 syn keyword dcdStatement MOVE ANDG ORRG NOTG ADDG SUBG MULG DIVG MODG INCR DECR | |
34 syn keyword dcdSpecial PRV1 PRV2 PRV3 PRV4 PRV5 PRV6 PRV7 PRV8 | |
35 | |
36 " Comment | |
37 syn region dcdComment start="\*" end="\;" | |
38 | |
39 " Define the default highlighting. | |
10048
43efa4f5a8ea
commit https://github.com/vim/vim/commit/89bcfda6834aba724d12554a34b9ed49f5789fd5
Christian Brabandt <cb@256bit.org>
parents:
7
diff
changeset
|
40 " Only when an item doesn't have highlighting yet |
7 | 41 |
10051
46763b01cd9a
commit https://github.com/vim/vim/commit/f37506f60f87d52a9e8850e30067645e2b13783c
Christian Brabandt <cb@256bit.org>
parents:
10048
diff
changeset
|
42 hi def link dcdFunction Identifier |
46763b01cd9a
commit https://github.com/vim/vim/commit/f37506f60f87d52a9e8850e30067645e2b13783c
Christian Brabandt <cb@256bit.org>
parents:
10048
diff
changeset
|
43 hi def link dcdLabel Constant |
46763b01cd9a
commit https://github.com/vim/vim/commit/f37506f60f87d52a9e8850e30067645e2b13783c
Christian Brabandt <cb@256bit.org>
parents:
10048
diff
changeset
|
44 hi def link dcdConditional Conditional |
46763b01cd9a
commit https://github.com/vim/vim/commit/f37506f60f87d52a9e8850e30067645e2b13783c
Christian Brabandt <cb@256bit.org>
parents:
10048
diff
changeset
|
45 hi def link dcdDisplay Type |
46763b01cd9a
commit https://github.com/vim/vim/commit/f37506f60f87d52a9e8850e30067645e2b13783c
Christian Brabandt <cb@256bit.org>
parents:
10048
diff
changeset
|
46 hi def link dcdStatement Statement |
46763b01cd9a
commit https://github.com/vim/vim/commit/f37506f60f87d52a9e8850e30067645e2b13783c
Christian Brabandt <cb@256bit.org>
parents:
10048
diff
changeset
|
47 hi def link dcdSpecial Special |
46763b01cd9a
commit https://github.com/vim/vim/commit/f37506f60f87d52a9e8850e30067645e2b13783c
Christian Brabandt <cb@256bit.org>
parents:
10048
diff
changeset
|
48 hi def link dcdComment Comment |
7 | 49 |
50 | |
51 let b:current_syntax = "dcd" |