" Vim syntax file " Language: Io " Filenames: *.io " Maintainers: Eric Radman " URL: http://static.eradman.com/code/io.vim " Last Change: 2011 Nov 25 - Initial code " Arguments and grouping syn match Function "(" syn match Function ")" " Strings syn region String start=/"/ skip=/\\./ end=/"/ syn region String start=/"""/ skip=/\\./ end=/"""/ " Assignment, including some possible user-defined operators that end with `=` " Io supports unicode identifiers, but \w is locale-specific " \h identifiers may not start with a digit syn match Define "\h\w* ="me=e-1 syn match Define "\h\w* .="me=e-2 syn match Define "\h\w* ..="me=e-3 " Interacitve mode syn match Comment "^Io [0-9]\{8\}$" syn match Comment "^Io> " syn match Comment "^... " syn region Comment start="^==> .*" end="^Io> " " Statement Separation syn match Delimiter ";" " Comments syn region Comment start='#' end='$' keepend syn region Comment start=/\/\*/ end=/\*\// syn region Comment start=/\/\// end=/$/ keepend " Line continuation (adapted from tcl.vim) syn match Special '\\$' " Integer number, or floating point number without a dot (adapted from tcl.vim) syn case ignore syn match Number "\<\d\+\(u\=l\=\|lu\|f\)\>" "floating point number, with dot, optional exponent syn match Number "\<\d\+\.\d*\(e[-+]\=\d\+\)\=[fl]\=\>" "floating point number, starting with a dot, optional exponent syn match Number "\.\d\+\(e[-+]\=\d\+\)\=\>" "floating point number, without dot, with exponent syn match Number "\<\d\+e[-+]\=\d\+[fl]\=\>" "hex number syn match Number "0x[0-9a-f]\+\(u\=l\=\|lu\)\>" syn case match let b:current_syntax = "io" " vim: ts=8 noet