Mercurial > vim
annotate runtime/syntax/haste.vim @ 19421:208644ebdff8 v8.2.0268
patch 8.2.0268: trycatch test fails
Commit: https://github.com/vim/vim/commit/40d9da2a4395025169ebaf53a63618adfa737e96
Author: Bram Moolenaar <Bram@vim.org>
Date: Mon Feb 17 10:01:24 2020 +0100
patch 8.2.0268: trycatch test fails
Problem: Trycatch test fails.
Solution: When calling function fails only check for following command, do
not give another error.
author | Bram Moolenaar <Bram@vim.org> |
---|---|
date | Mon, 17 Feb 2020 10:15:04 +0100 |
parents | 43efa4f5a8ea |
children |
rev | line source |
---|---|
1623 | 1 " Vim syntax file |
1668 | 2 " Language: HASTE - a language for VLSI IC programming |
1623 | 3 " Maintainer: M. Tranchero - maurizio.tranchero?gmail.com |
4 " Credits: some parts have been taken from vhdl, verilog, and C syntax | |
5 " files | |
1668 | 6 " Version: 0.9 |
7 " Last Change: 0.9 improvement of haste numbers detection | |
8 " Change: 0.8 error matching for wrong hierarchical connections | |
9 " Change: 0.7 added more rules to highlight pre-processor directives | |
1623 | 10 |
11 " HASTE | |
12 if exists("b:current_syntax") | |
13 finish | |
14 endif | |
10048
43efa4f5a8ea
commit https://github.com/vim/vim/commit/89bcfda6834aba724d12554a34b9ed49f5789fd5
Christian Brabandt <cb@256bit.org>
parents:
1668
diff
changeset
|
15 " quit when a syntax file was already loaded |
43efa4f5a8ea
commit https://github.com/vim/vim/commit/89bcfda6834aba724d12554a34b9ed49f5789fd5
Christian Brabandt <cb@256bit.org>
parents:
1668
diff
changeset
|
16 if exists("b:current_syntax") |
1623 | 17 finish |
18 endif | |
19 | |
20 " case is significant | |
21 syn case match | |
22 | |
23 " HASTE keywords | |
24 syn keyword hasteStatement act alias arb array begin bitvec | |
25 syn keyword hasteStatement bitwidth boolvec broad case | |
26 syn keyword hasteStatement cast chan const dataprobe do edge | |
27 syn keyword hasteStatement else end export false ff fi file | |
28 syn keyword hasteStatement fit for forever func if import | |
29 syn keyword hasteStatement inprobe is les main narb narrow | |
30 syn keyword hasteStatement negedge od of or outprobe pas | |
31 syn keyword hasteStatement posedge probe proc ram ramreg | |
32 syn keyword hasteStatement repeat rom romreg sample sel si | |
33 syn keyword hasteStatement sign sizeof skip stop then true | |
34 syn keyword hasteStatement type until var wait wire | |
35 syn keyword hasteFutureExt Z ffe partial | |
36 syn keyword hasteVerilog buf reg while | |
37 | |
38 " Special match for "if", "or", and "else" since "else if" | |
39 " and other "else+if" combination shouldn't be highlighted. | |
40 " The right keyword is "or" | |
41 syn match hasteStatement "\<\(if\|then\|else\|fi\)\>" | |
42 syn match hasteNone "\<else\s\+if\>$" | |
43 syn match hasteNone "\<else\s\+if\>\s" | |
44 syn match hasteNone "\<elseif\>\s" | |
45 syn match hasteNone "\<elsif\>\s" | |
46 syn match hasteStatement "\<\(case\|is\|si\)\>" | |
47 syn match hasteStatement "\<\(repeat\|until\)\>" | |
48 syn match hasteStatement "\<\(forever\|do\|od\)\>" | |
49 syn match hasteStatement "\<\(for\|do\|od\)\>" | |
50 syn match hasteStatement "\<\(do\|or\|od\)\>" | |
51 syn match hasteStatement "\<\(sel\|les\)\>" | |
52 syn match hasteError "\<\d\+[_a-zA-Z]\+\>" | |
1668 | 53 syn match hasteError "\(\([[:alnum:]]\+\s*(\s\+\|)\s*,\)\)\s*\([[:alnum:]]\+\s*(\)" |
1623 | 54 |
55 " Predifined Haste types | |
56 syn keyword hasteType bool | |
57 | |
58 " Values for standard Haste types | |
59 " syn match hasteVector "\'[0L1HXWZU\-\?]\'" | |
60 | |
61 syn match hasteVector "0b\"[01_]\+\"" | |
62 syn match hasteVector "0x\"[0-9a-f_]\+\"" | |
63 syn match hasteCharacter "'.'" | |
1668 | 64 " syn region hasteString start=+"+ end=+"+ |
1623 | 65 syn match hasteIncluded display contained "<[^>]*>" |
66 syn match hasteIncluded display contained "<[^"]*>" | |
1668 | 67 syn region hasteInclude start="^\s*#include\>\s*" end="$" contains=hasteIncluded,hasteString |
1623 | 68 |
69 " integer numbers | |
1668 | 70 syn match hasteNumber "\d\+\^[[:alnum:]]*[-+]\{0,1\}[[:alnum:]]*" |
71 syn match hasteNumber "-\=\<\d\+\(\^[+\-]\=\d\+\)\>" | |
1623 | 72 syn match hasteNumber "-\=\<\d\+\>" |
1668 | 73 " syn match hasteNumber "0*2#[01_]\+#\(\^[+\-]\=\d\+\)\=" |
74 " syn match hasteNumber "0*16#[0-9a-f_]\+#\(\^[+\-]\=\d\+\)\=" | |
1623 | 75 " operators |
1668 | 76 syn keyword hasteSeparators & , . \| |
1623 | 77 syn keyword hasteExecution \|\| ; @ |
1668 | 78 syn keyword hasteOperator := ? ! : |
1623 | 79 syn keyword hasteTypeConstr "[" << >> .. "]" ~ |
80 syn keyword hasteExprOp < <= >= > = # <> + - * == ## | |
81 syn keyword hasteMisc ( ) 0x 0b | |
82 " | |
83 syn match hasteSeparators "[&:\|,.]" | |
84 syn match hasteOperator ":=" | |
1668 | 85 syn match hasteOperator ":" |
1623 | 86 syn match hasteOperator "?" |
87 syn match hasteOperator "!" | |
88 syn match hasteExecution "||" | |
89 syn match hasteExecution ";" | |
90 syn match hasteExecution "@" | |
91 syn match hasteType "\[\[" | |
92 syn match hasteType "\]\]" | |
93 syn match hasteType "<<" | |
94 syn match hasteType ">>" | |
95 syn match hasteExprOp "<" | |
96 syn match hasteExprOp "<=" | |
97 syn match hasteExprOp ">=" | |
98 syn match hasteExprOp ">" | |
99 syn match hasteExprOp "<>" | |
100 syn match hasteExprOp "=" | |
101 syn match hasteExprOp "==" | |
102 syn match hasteExprOp "##" | |
1668 | 103 " syn match hasteExprOp "#" |
1623 | 104 syn match hasteExprOp "*" |
105 syn match hasteExprOp "+" | |
106 | |
107 syn region hasteComment start="/\*" end="\*/" contains=@Spell | |
108 syn region hasteComment start="{" end="}" contains=@Spell | |
109 syn match hasteComment "//.*" contains=@Spell | |
110 | |
111 " Define the default highlighting. | |
112 " Only when an item doesn't have highlighting yet | |
113 hi def link hasteSpecial Special | |
114 hi def link hasteStatement Statement | |
115 hi def link hasteCharacter String | |
116 hi def link hasteString String | |
117 hi def link hasteVector String | |
118 hi def link hasteBoolean String | |
119 hi def link hasteComment Comment | |
120 hi def link hasteNumber String | |
121 hi def link hasteTime String | |
122 hi def link hasteType Type | |
123 hi def link hasteGlobal Error | |
124 hi def link hasteError Error | |
125 hi def link hasteAttribute Type | |
1668 | 126 " |
1623 | 127 hi def link hasteSeparators Special |
128 hi def link hasteExecution Special | |
129 hi def link hasteTypeConstr Special | |
130 hi def link hasteOperator Type | |
131 hi def link hasteExprOp Type | |
132 hi def link hasteMisc String | |
133 hi def link hasteFutureExt Error | |
134 hi def link hasteVerilog Error | |
135 hi def link hasteDefine Macro | |
136 hi def link hasteInclude Include | |
1668 | 137 " hi def link hastePreProc Preproc |
138 " hi def link hastePreProcVar Special | |
1623 | 139 |
140 let b:current_syntax = "haste" | |
141 | |
142 " vim: ts=8 |