Commit 3546d00b authored by Martin Pépin's avatar Martin Pépin
Browse files

A first syntax file for minijazz

parents
" Vim syntax file
" Language: Minijazz
" Filenames: *.mj
" Minijazz is case sensitive
syntax case match
" Static type parameters
syntax region Type start="<" end=">"
syntax match Type ":\[[^\]]\+\]"
" Builtin functions
syntax keyword Identifier mux and or xor not
" Builtin operators and symbols
syntax match Statement "\*"
syntax match Statement "+"
syntax match Statement "&"
syntax match Statement "\^"
syntax match Statement "\."
syntax match Statement ";"
syntax match Statement ","
syntax match Statement "="
" Constants
syntax keyword Constant false true
syntax match Constant "\[\]"
" Integers
syntax match Number "\<\d\+\>"
" If statements
syntax region None matchgroup=Statement start="\<if\>" matchgroup=Statement end="\<end if\>" contains=ALLBUT,Identifier
syntax keyword Statement then else
" Block definition
syntax region None matchgroup=Statement start="\<where\>" matchgroup=Statement end="\<end where\>" contains=ALLBUT,Identifier
" Special highlight for require: not a Minijazz standard but used in our custom
" implementation
syntax match Include "^require"
" Brackets and co
syntax region None matchgroup=Keyword start="(" matchgroup=Keyword end=")" contains=ALLBUT,Identifier
syntax region None matchgroup=Keyword start="\[" matchgroup=Keyword end="\]" contains=ALLBUT,Identifier
" Comments
syntax region Comment start="(\*" end="\*)"
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment