File: antlr4.vim

package info (click to toggle)
vim 2%3A9.1.1882-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 92,504 kB
  • sloc: ansic: 432,444; cpp: 6,371; makefile: 4,596; sh: 2,387; java: 2,312; xml: 2,099; python: 1,559; perl: 1,419; awk: 730; lisp: 501; cs: 458; objc: 369; sed: 8; csh: 6
file content (30 lines) | stat: -rw-r--r-- 1,110 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
" Vim syntax file
" Language:	ANTLR4, ANother Tool for Language Recognition v4 <www.antlr.org>
" Maintainer:	Yinzuo Jiang <jiangyinzuo@foxmail.com>
" Last Change:	2024 July 09

" quit when a syntax file was already loaded
if exists("b:current_syntax")
  finish
endif

" Keywords. See https://github.com/antlr/antlr4/blob/4.13.1/doc/lexicon.md
syn keyword antlr4Include import
" https://github.com/antlr/antlr4/blob/4.13.1/doc/options.md
" https://github.com/antlr/antlr4/blob/4.13.1/doc/grammars.md
syn keyword antlr4Structure fragment lexer parser grammar options channels tokens mode
syn keyword antlr4Statement returns locals
syn keyword antlr4Exceptions throws catch finally

" Comments.
syn keyword antlr4Todo contained TODO FIXME XXX NOTE
syn region antlr4Comment start="//"  end="$"   contains=antlr4Todo,@Spell
syn region antlr4Comment start="/\*" end="\*/" contains=antlr4Todo,@Spell

hi def link antlr4Include Include
hi def link antlr4Structure Structure
hi def link antlr4Statement Statement
hi def link antlr4Exceptions Structure
hi def link antlr4Comment Comment

let b:current_syntax = "antlr4"