annotate runtime/syntax/routeros.vim @ 33293:42b89193ab3e v9.0.1912

patch 9.0.1912: Cirrus-CI running out of credits Commit: https://github.com/vim/vim/commit/6f00d17e8d64ed46c85625e8ac38ed0928b32c58 Author: Christian Brabandt <cb@256bit.org> Date: Tue Sep 19 20:16:46 2023 +0200 patch 9.0.1912: Cirrus-CI running out of credits Problem: Cirrus-CI running out of credits Solution: disable Cirrus-CI for now We are running out of credits for Cirrus CI already at the middle of the month and unfortunately this means our CI now consistently fails. This all hapens because cirrus ci is not enforcing the free-tier limits (see also https://cirrus-ci.org/blog/2023/07/17/limiting-free-usage-of-cirrus-ci/). Perhaps at the beginning of the next month we can revisit and enable just a build without testing it. Hopefully this is won't take too many credits and we can at least verify that building works. Signed-off-by: Christian Brabandt <cb@256bit.org>
author Christian Brabandt <cb@256bit.org>
date Tue, 19 Sep 2023 20:30:10 +0200
parents 624439a39432
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
26148
624439a39432 Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
1 " Vim syntax file
624439a39432 Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
2 " Language: MikroTik RouterOS Script
624439a39432 Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
3 " Maintainer: zainin <z@wintr.dev>
624439a39432 Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
4 " Original Author: ndbjorne @ MikroTik forums
624439a39432 Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
5 " Last Change: 2021 Nov 14
624439a39432 Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
6
624439a39432 Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
7 " quit when a syntax file was already loaded
624439a39432 Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
8 if exists("b:current_syntax")
624439a39432 Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
9 finish
624439a39432 Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
10 endif
624439a39432 Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
11
624439a39432 Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
12 syn case ignore
624439a39432 Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
13
624439a39432 Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
14 syn iskeyword @,48-57,-
624439a39432 Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
15
624439a39432 Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
16 " comments
624439a39432 Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
17 syn match routerosComment /^\s*\zs#.*/
624439a39432 Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
18
624439a39432 Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
19 " options submenus: /interface ether1 etc
624439a39432 Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
20 syn match routerosSubMenu "\([a-z]\)\@<!/[a-zA-Z0-9-]*"
624439a39432 Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
21
624439a39432 Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
22 " variables are matched by looking at strings ending with "=", e.g. var=
624439a39432 Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
23 syn match routerosVariable "[a-zA-Z0-9-/]*\(=\)\@="
624439a39432 Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
24 syn match routerosVariable "$[a-zA-Z0-9-]*"
624439a39432 Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
25
624439a39432 Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
26 " colored for clarity
624439a39432 Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
27 syn match routerosDelimiter "[,=]"
624439a39432 Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
28 " match slash in CIDR notation (1.2.3.4/24, 2001:db8::/48, ::1/128)
624439a39432 Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
29 syn match routerosDelimiter "\(\x\|:\)\@<=\/\(\d\)\@="
624439a39432 Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
30 " dash in IP ranges
624439a39432 Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
31 syn match routerosDelimiter "\(\x\|:\)\@<=-\(\x\|:\)\@="
624439a39432 Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
32
624439a39432 Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
33 " match service names after "set", like in original routeros syntax
624439a39432 Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
34 syn match routerosService "\(set\)\@<=\s\(api-ssl\|api\|dns\|ftp\|http\|https\|pim\|ntp\|smb\|ssh\|telnet\|winbox\|www\|www-ssl\)"
624439a39432 Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
35
624439a39432 Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
36 " colors various interfaces
624439a39432 Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
37 syn match routerosInterface "bridge\d\+\|ether\d\+\|wlan\d\+\|pppoe-\(out\|in\)\d\+"
624439a39432 Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
38
624439a39432 Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
39 syn keyword routerosBoolean yes no true false
624439a39432 Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
40
624439a39432 Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
41 syn keyword routerosConditional if
624439a39432 Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
42
624439a39432 Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
43 " operators
624439a39432 Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
44 syn match routerosOperator " \zs[-+*<>=!~^&.,]\ze "
624439a39432 Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
45 syn match routerosOperator "[<>!]="
624439a39432 Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
46 syn match routerosOperator "<<\|>>"
624439a39432 Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
47 syn match routerosOperator "[+-]\d\@="
624439a39432 Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
48
624439a39432 Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
49 syn keyword routerosOperator and or in
624439a39432 Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
50
624439a39432 Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
51 " commands
624439a39432 Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
52 syn keyword routerosCommands beep delay put len typeof pick log time set find environment
624439a39432 Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
53 syn keyword routerosCommands terminal error parse resolve toarray tobool toid toip toip6
624439a39432 Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
54 syn keyword routerosCommands tonum tostr totime add remove enable disable where get print
624439a39432 Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
55 syn keyword routerosCommands export edit find append as-value brief detail count-only file
624439a39432 Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
56 syn keyword routerosCommands follow follow-only from interval terse value-list without-paging
624439a39432 Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
57 syn keyword routerosCommands return
624439a39432 Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
58
624439a39432 Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
59 " variable types
624439a39432 Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
60 syn keyword routerosType global local
624439a39432 Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
61
624439a39432 Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
62 " loop keywords
624439a39432 Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
63 syn keyword routerosRepeat do while for foreach
624439a39432 Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
64
624439a39432 Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
65 syn match routerosSpecial "[():[\]{|}]"
624439a39432 Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
66
624439a39432 Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
67 syn match routerosLineContinuation "\\$"
624439a39432 Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
68
624439a39432 Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
69 syn match routerosEscape "\\["\\nrt$?_abfv]" contained display
624439a39432 Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
70 syn match routerosEscape "\\\x\x" contained display
624439a39432 Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
71
624439a39432 Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
72 syn region routerosString start=+"+ skip=+\\\\\|\\"+ end=+"+ contains=routerosEscape,routerosLineContinuation
624439a39432 Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
73
624439a39432 Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
74 hi link routerosComment Comment
624439a39432 Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
75 hi link routerosSubMenu Function
624439a39432 Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
76 hi link routerosVariable Identifier
624439a39432 Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
77 hi link routerosDelimiter Operator
624439a39432 Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
78 hi link routerosEscape Special
624439a39432 Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
79 hi link routerosService Type
624439a39432 Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
80 hi link routerosInterface Type
624439a39432 Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
81 hi link routerosBoolean Boolean
624439a39432 Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
82 hi link routerosConditional Conditional
624439a39432 Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
83 hi link routerosOperator Operator
624439a39432 Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
84 hi link routerosCommands Operator
624439a39432 Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
85 hi link routerosType Type
624439a39432 Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
86 hi link routerosRepeat Repeat
624439a39432 Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
87 hi link routerosSpecial Delimiter
624439a39432 Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
88 hi link routerosString String
624439a39432 Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
89 hi link routerosLineContinuation Special
624439a39432 Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
90
624439a39432 Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
91 let b:current_syntax = "routeros"