Mercurial > vim
annotate runtime/syntax/modula3.vim @ 29150:d1fe80fb35e6
Update runtime files
Commit: https://github.com/vim/vim/commit/8c1b8cb2e0b52d0853f85c2096a2f22dbc57a788
Author: Bram Moolenaar <Bram@vim.org>
Date: Tue Jun 14 17:41:28 2022 +0100
Update runtime files
author | Bram Moolenaar <Bram@vim.org> |
---|---|
date | Tue, 14 Jun 2022 18:45:04 +0200 |
parents | 9f41bfdbc6fc |
children | 5acd6f02ea35 |
rev | line source |
---|---|
7 | 1 " Vim syntax file |
24468 | 2 " Language: Modula-3 |
3 " Maintainer: Doug Kearns <dougkearns@gmail.com> | |
4 " Previous Maintainer: Timo Pedersen <dat97tpe@ludat.lth.se> | |
5 " Last Change: 2021 Apr 08 | |
7 | 6 |
10048
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 | |
24468 | 11 " Modula-3 keywords |
12 syn keyword modula3Keyword ANY ARRAY AS BITS BRANDED BY CASE CONST DEFINITION | |
13 syn keyword modula3Keyword EVAL EXIT EXCEPT EXCEPTION EXIT EXPORTS FINALLY | |
14 syn keyword modula3Keyword FROM GENERIC IMPORT LOCK METHOD OF RAISE RAISES | |
15 syn keyword modula3Keyword READONLY RECORD REF RETURN SET TRY TYPE TYPECASE | |
16 syn keyword modula3Keyword UNSAFE VALUE VAR WITH | |
7 | 17 |
24468 | 18 syn match modula3keyword "\<UNTRACED\>" |
7 | 19 |
20 " Special keywords, block delimiters etc | |
21 syn keyword modula3Block PROCEDURE FUNCTION MODULE INTERFACE REPEAT THEN | |
22 syn keyword modula3Block BEGIN END OBJECT METHODS OVERRIDES RECORD REVEAL | |
23 syn keyword modula3Block WHILE UNTIL DO TO IF FOR ELSIF ELSE LOOP | |
24 | |
24468 | 25 " Reserved identifiers |
26 syn keyword modula3Identifier ABS ADR ADRSIZE BITSIZE BYTESIZE CEILING DEC | |
27 syn keyword modula3Identifier DISPOSE FIRST FLOAT FLOOR INC ISTYPE LAST | |
28 syn keyword modula3Identifier LOOPHOLE MAX MIN NARROW NEW NUMBER ORD ROUND | |
29 syn keyword modula3Identifier SUBARRAY TRUNC TYPECODE VAL | |
30 | |
31 " Predefined types | |
32 syn keyword modula3Type ADDRESS BOOLEAN CARDINAL CHAR EXTENDED INTEGER | |
33 syn keyword modula3Type LONGCARD LONGINT LONGREAL MUTEX NULL REAL REFANY TEXT | |
34 syn keyword modula3Type WIDECHAR | |
35 | |
36 syn match modula3Type "\<\%(UNTRACED\s\+\)\=ROOT\>" | |
37 | |
38 " Operators | |
39 syn keyword modulaOperator DIV MOD IN AND OR NOT | |
40 | |
41 if exists("modula3_operators") | |
42 syn match modula3Operator "\^" | |
43 syn match modula3Operator "+\|-\|\*\|/\|&" | |
44 " TODO: need to exclude = in procedure definitions | |
45 syn match modula3Operator "<=\|<\|>=\|>\|:\@<!=\|#" | |
46 endif | |
47 | |
48 " Booleans | |
49 syn keyword modula3Boolean TRUE FALSE | |
50 | |
51 " Nil | |
52 syn keyword modula3Nil NIL | |
53 | |
54 " Integers | |
55 syn match modula3Integer "\<\d\+L\=\>" | |
56 syn match modula3Integer "\<\d\d\=_\x\+L\=\>" | |
57 | |
58 " Reals | |
59 syn match modula3Real "\c\<\d\+\.\d\+\%([EDX][+-]\=\d\+\)\=\>" | |
60 | |
61 " String escape sequences | |
62 syn match modula3Escape "\\['"ntrf]" contained display | |
63 syn match modula3Escape "\\\o\{3}" contained display | |
64 syn match modula3Escape "\\\\" contained display | |
65 | |
66 " Characters | |
67 syn match modula3Character "'\%([^']\|\\.\|\\\o\{3}\)'" contains=modula3Escape | |
7 | 68 |
69 " Strings | |
24468 | 70 syn region modula3String start=+"+ end=+"+ contains=modula3Escape |
7 | 71 |
24468 | 72 " Pragmas |
73 syn region modula3Pragma start="<\*" end="\*>" | |
74 | |
75 " Comments | |
76 syn region modula3Comment start="(\*" end="\*)" contains=modula3Comment,@Spell | |
7 | 77 |
24468 | 78 " Default highlighting |
79 hi def link modula3Block Statement | |
80 hi def link modula3Boolean Boolean | |
81 hi def link modula3Character Character | |
82 hi def link modula3Comment Comment | |
83 hi def link modula3Escape Special | |
84 hi def link modula3Identifier Keyword | |
85 hi def link modula3Integer Number | |
10051
46763b01cd9a
commit https://github.com/vim/vim/commit/f37506f60f87d52a9e8850e30067645e2b13783c
Christian Brabandt <cb@256bit.org>
parents:
10048
diff
changeset
|
86 hi def link modula3Keyword Statement |
24468 | 87 hi def link modula3Nil Constant |
88 hi def link modula3Operator Operator | |
89 hi def link modula3Pragma PreProc | |
90 hi def link modula3Real Float | |
91 hi def link modula3String String | |
92 hi def link modula3Type Type | |
7 | 93 |
94 let b:current_syntax = "modula3" | |
95 | |
24468 | 96 " vim: nowrap sw=2 sts=2 ts=8 noet: |