summaryrefslogtreecommitdiff
path: root/runtime/syntax/modula3.vim
diff options
context:
space:
mode:
authorBram Moolenaar <Bram@vim.org>2004-06-13 20:20:40 +0000
committerBram Moolenaar <Bram@vim.org>2004-06-13 20:20:40 +0000
commit071d4279d6ab81b7187b48f3a0fc61e587b6db6c (patch)
tree221cbe3c40e043163c06f61c52a7ba2eb41e12ce /runtime/syntax/modula3.vim
parentb4210b3bc14e2918f153a7307530fbe6eba659e1 (diff)
downloadvim-git-071d4279d6ab81b7187b48f3a0fc61e587b6db6c.tar.gz
updated for version 7.0001v7.0001
Diffstat (limited to 'runtime/syntax/modula3.vim')
-rw-r--r--runtime/syntax/modula3.vim72
1 files changed, 72 insertions, 0 deletions
diff --git a/runtime/syntax/modula3.vim b/runtime/syntax/modula3.vim
new file mode 100644
index 000000000..d6f72afbc
--- /dev/null
+++ b/runtime/syntax/modula3.vim
@@ -0,0 +1,72 @@
+" Vim syntax file
+" Language: Modula-3
+" Maintainer: Timo Pedersen <dat97tpe@ludat.lth.se>
+" Last Change: 2001 May 10
+
+" Basic things only...
+" Based on the modula 2 syntax file
+
+" For version 5.x: Clear all syntax items
+" For version 6.x: Quit when a syntax file was already loaded
+if version < 600
+ syntax clear
+elseif exists("b:current_syntax")
+ finish
+endif
+
+" Modula-3 is case-sensitive
+" syn case ignore
+
+" Modula-3 keywords
+syn keyword modula3Keyword ABS ADDRES ADR ADRSIZE AND ANY
+syn keyword modula3Keyword ARRAY AS BITS BITSIZE BOOLEAN BRANDED BY BYTESIZE
+syn keyword modula3Keyword CARDINAL CASE CEILING CHAR CONST DEC DEFINITION
+syn keyword modula3Keyword DISPOSE DIV
+syn keyword modula3Keyword EVAL EXIT EXCEPT EXCEPTION
+syn keyword modula3Keyword EXIT EXPORTS EXTENDED FALSE FINALLY FIRST FLOAT
+syn keyword modula3Keyword FLOOR FROM GENERIC IMPORT
+syn keyword modula3Keyword IN INC INTEGER ISTYPE LAST LOCK
+syn keyword modula3Keyword LONGREAL LOOPHOLE MAX METHOD MIN MOD MUTEX
+syn keyword modula3Keyword NARROW NEW NIL NOT NULL NUMBER OF OR ORD RAISE
+syn keyword modula3Keyword RAISES READONLY REAL RECORD REF REFANY
+syn keyword modula3Keyword RETURN ROOT
+syn keyword modula3Keyword ROUND SET SUBARRAY TEXT TRUE TRUNC TRY TYPE
+syn keyword modula3Keyword TYPECASE TYPECODE UNSAFE UNTRACED VAL VALUE VAR WITH
+
+" Special keywords, block delimiters etc
+syn keyword modula3Block PROCEDURE FUNCTION MODULE INTERFACE REPEAT THEN
+syn keyword modula3Block BEGIN END OBJECT METHODS OVERRIDES RECORD REVEAL
+syn keyword modula3Block WHILE UNTIL DO TO IF FOR ELSIF ELSE LOOP
+
+" Comments
+syn region modula3Comment start="(\*" end="\*)"
+
+" Strings
+syn region modula3String start=+"+ end=+"+
+syn region modula3String start=+'+ end=+'+
+
+" Define the default highlighting.
+" For version 5.7 and earlier: only when not done already
+" For version 5.8 and later: only when an item doesn't have highlighting yet
+if version >= 508 || !exists("did_modula3_syntax_inits")
+ if version < 508
+ let did_modula3_syntax_inits = 1
+ command -nargs=+ HiLink hi link <args>
+ else
+ command -nargs=+ HiLink hi def link <args>
+ endif
+
+ " The default methods for highlighting. Can be overridden later
+ HiLink modula3Keyword Statement
+ HiLink modula3Block PreProc
+ HiLink modula3Comment Comment
+ HiLink modula3String String
+
+ delcommand HiLink
+endif
+
+let b:current_syntax = "modula3"
+
+"I prefer to use this...
+"set ai
+"vim: ts=8