3 " Maintainer: Timo Pedersen <dat97tpe@ludat.lth.se>
4 " Last Change: 2001 May 10
7 " Based on the modula 2 syntax file
9 " For version 5.x: Clear all syntax items
10 " For version 6.x: Quit when a syntax file was already loaded
13 elseif exists("b:current_syntax")
17 " Modula-3 is case-sensitive
21 syn keyword modula3Keyword ABS ADDRES ADR ADRSIZE AND ANY
22 syn keyword modula3Keyword ARRAY AS BITS BITSIZE BOOLEAN BRANDED BY BYTESIZE
23 syn keyword modula3Keyword CARDINAL CASE CEILING CHAR CONST DEC DEFINITION
24 syn keyword modula3Keyword DISPOSE DIV
25 syn keyword modula3Keyword EVAL EXIT EXCEPT EXCEPTION
26 syn keyword modula3Keyword EXIT EXPORTS EXTENDED FALSE FINALLY FIRST FLOAT
27 syn keyword modula3Keyword FLOOR FROM GENERIC IMPORT
28 syn keyword modula3Keyword IN INC INTEGER ISTYPE LAST LOCK
29 syn keyword modula3Keyword LONGREAL LOOPHOLE MAX METHOD MIN MOD MUTEX
30 syn keyword modula3Keyword NARROW NEW NIL NOT NULL NUMBER OF OR ORD RAISE
31 syn keyword modula3Keyword RAISES READONLY REAL RECORD REF REFANY
32 syn keyword modula3Keyword RETURN ROOT
33 syn keyword modula3Keyword ROUND SET SUBARRAY TEXT TRUE TRUNC TRY TYPE
34 syn keyword modula3Keyword TYPECASE TYPECODE UNSAFE UNTRACED VAL VALUE VAR WITH
36 " Special keywords, block delimiters etc
37 syn keyword modula3Block PROCEDURE FUNCTION MODULE INTERFACE REPEAT THEN
38 syn keyword modula3Block BEGIN END OBJECT METHODS OVERRIDES RECORD REVEAL
39 syn keyword modula3Block WHILE UNTIL DO TO IF FOR ELSIF ELSE LOOP
42 syn region modula3Comment start="(\*" end="\*)"
45 syn region modula3String start=+"+ end=+"+
46 syn region modula3String start=+'+ end=+'+
48 " Define the default highlighting.
49 " For version 5.7 and earlier: only when not done already
50 " For version 5.8 and later: only when an item doesn't have highlighting yet
51 if version >= 508 || !exists("did_modula3_syntax_inits")
53 let did_modula3_syntax_inits = 1
54 command -nargs=+ HiLink hi link <args>
56 command -nargs=+ HiLink hi def link <args>
59 " The default methods for highlighting. Can be overridden later
60 HiLink modula3Keyword Statement
61 HiLink modula3Block PreProc
62 HiLink modula3Comment Comment
63 HiLink modula3String String
68 let b:current_syntax = "modula3"
70 "I prefer to use this...