annotate runtime/syntax/modula3.vim @ 24637:4a4f64cdc798 v8.2.2857

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