vim: add syntax highlighting support for intermediate language

This commit is contained in:
2025-01-27 19:19:29 +00:00
parent b4fd6a999b
commit 02ebb5c32b
10 changed files with 95 additions and 8 deletions

View File

@@ -11,12 +11,12 @@ syn match ivyType /\<[A-Z]\{1,2\}\([a-z0-9]\+[A-Z]\{0,
" we have to use syn match for keywords because any keyword can be used as a
" label by adding : to the end, and adding : to iskeyword causes more problems
" than it solves.
syn match ivyStorage /\(class\|protocol\)\(\:\)\@!/
syn match ivyRepeat /\(for\|while\|break\|continue\)\(\:\)\@!/
syn match ivyConditional /\(if\|elif\|else\|unless\|match\)\(\:\)\@!/
syn match ivyException /\(try\|catch\|finally\|throw\)\(\:\)\@!/
syn match ivyBuiltinVar /\(error\|cout\|cin\|cerr\)\(\:\)\@!/
syn match ivyUnspecifiedStatement /\(end\|package\|use\|as\|then\|in\|do\|get\|set\)\(\:\)\@!/
syn match ivyStorage /\(class\|protocol\)\>\(\:\)\@!/
syn match ivyRepeat /\(for\|while\|break\|continue\)\>\(\:\)\@!/
syn match ivyConditional /\(if\|elif\|else\|unless\|match\)\>\(\:\)\@!/
syn match ivyException /\(try\|catch\|finally\|throw\)\>\(\:\)\@!/
syn match ivyBuiltinVar /\(error\|cout\|cin\|cerr\)\>\(\:\)\@!/
syn match ivyUnspecifiedStatement /\(end\|package\|use\|as\|then\|in\|do\|get\|set\)\>\(\:\)\@!/
syn match ivySelectorLabel /\<[a-z][A-Za-z0-9_]*\:/
"syn match ivySelectorLabel /\<\([a-z]\([A-Za-z0-9_]\+\)\:\(\:\)\@!\)\+/