Bram Moolenaar | 071d427 | 2004-06-13 20:20:40 +0000 | [diff] [blame] | 1 | " Vim syntax file |
| 2 | " Language: SMITH |
| 3 | " Maintainer: Rafal M. Sulejman <rms@poczta.onet.pl> |
| 4 | " Last Change: 21.07.2000 |
| 5 | |
Bram Moolenaar | 89bcfda | 2016-08-30 23:26:57 +0200 | [diff] [blame] | 6 | " quit when a syntax file was already loaded |
| 7 | if exists("b:current_syntax") |
Bram Moolenaar | 071d427 | 2004-06-13 20:20:40 +0000 | [diff] [blame] | 8 | finish |
| 9 | endif |
| 10 | |
| 11 | syn case ignore |
| 12 | |
| 13 | |
| 14 | syn match smithComment ";.*$" |
| 15 | |
| 16 | syn match smithNumber "\<[+-]*[0-9]\d*\>" |
| 17 | |
| 18 | syn match smithRegister "R[\[]*[0-9]*[\]]*" |
| 19 | |
| 20 | syn match smithKeyword "COR\|MOV\|MUL\|NOT\|STOP\|SUB\|NOP\|BLA\|REP" |
| 21 | |
| 22 | syn region smithString start=+"+ skip=+\\\\\|\\"+ end=+"+ |
| 23 | |
| 24 | |
| 25 | syn case match |
| 26 | |
| 27 | " Define the default highlighting. |
Bram Moolenaar | 89bcfda | 2016-08-30 23:26:57 +0200 | [diff] [blame] | 28 | " Only when an item doesn't have highlighting yet |
| 29 | command -nargs=+ HiLink hi def link <args> |
Bram Moolenaar | 071d427 | 2004-06-13 20:20:40 +0000 | [diff] [blame] | 30 | |
Bram Moolenaar | 89bcfda | 2016-08-30 23:26:57 +0200 | [diff] [blame] | 31 | HiLink smithRegister Identifier |
| 32 | HiLink smithKeyword Keyword |
| 33 | HiLink smithComment Comment |
| 34 | HiLink smithString String |
| 35 | HiLink smithNumber Number |
Bram Moolenaar | 071d427 | 2004-06-13 20:20:40 +0000 | [diff] [blame] | 36 | |
Bram Moolenaar | 89bcfda | 2016-08-30 23:26:57 +0200 | [diff] [blame] | 37 | delcommand HiLink |
Bram Moolenaar | 071d427 | 2004-06-13 20:20:40 +0000 | [diff] [blame] | 38 | |
| 39 | let b:current_syntax = "smith" |
| 40 | |
| 41 | " vim: ts=2 |