Skip to content

Commit

Permalink
New test + new vim syntax.
Browse files Browse the repository at this point in the history
  • Loading branch information
pramodsu committed Feb 1, 2018
1 parent ebf0521 commit 2dc6fbd
Show file tree
Hide file tree
Showing 2 changed files with 22 additions and 16 deletions.
14 changes: 14 additions & 0 deletions test/test-history-1.ucl
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
module main {
var ltl__pending__p1_4 : bool;
init {
ltl__pending__p1_4 = true;
}
next {
ltl__pending__p1_4 = history(ltl__pending__p1_4, 1);
assert (ltl__pending__p1_4);
}
control {
unroll(5);
check;
}
}
24 changes: 8 additions & 16 deletions vim/uclid.vim
Original file line number Diff line number Diff line change
Expand Up @@ -34,19 +34,18 @@ syn match ucl4Identifier display "[A-Za-z_][A-Za-z0-9_]\*"
" TODO: include strings ?
"
syn keyword ucl4Todo contained TODO FIXME XXX NOTE
syn region ucl4MultilineComment start="\/\*" end="\*\/" contains=ucl4Todo
hi def link ucl4MultilineComment Comment
syn match ucl4TrailingComment "\/\/.*$" contains=ucl4Todo
hi def link ucl4TrailingComment Comment
syn match ucl4LineComment "\/\/.*$" contains=ucl4Todo
hi def link ucl4LineComment Comment
syn region ucl4MultilineComment start="/\*" end="\*/" contains=ucl4Todo keepend fold
hi link ucl4MultilineComment Comment
syn match ucl4TrailingComment "//.*" contains=ucl4Todo
hi link ucl4TrailingComment Comment

" unicode characters
syn match ucl4Number "\<\(0[0-7]*\|0[xX]\x\+\|\d\+\)[lL]\=\>"
syn match ucl4Number "\(\<\d\+\.\d*\|\.\d\+\)\([eE][-+]\=\d\+\)\=[fFdD]\="
syn match ucl4Number "\<\d\+[eE][-+]\=\d\+[fFdD]\=\>"
syn match ucl4Number "\<\d\+\([eE][-+]\=\d\+\)\=[fFdD]\>"
syn match ucl4Number "\<\d\+bv\d\+\>"
syn match ucl4Operator ":=\|==\|+\|-\|*\|&&\|||\|^\|!"
syn match ucl4Operator "=\|==\|+\|-\|*\|&&\|||\|^\|!\|==>\|<==>"

" The default highlighting.
hi def link ucl4Type Type
Expand All @@ -57,15 +56,8 @@ hi def link ucl4Constant Constant
hi def link ucl4Cmd Define
hi def link ucl4Operator Operator

hi def link ucl4Todo Todo
hi def link ucl4Todo TODO

hi def link ucl4Number Number

let b:current_syntax = "ucl4"

" let &cpo = s:ucl4_cpo_save
" unlet s:ucl4_cpo_save

" set efm+=%f(%l\\,%c):\ %m

" vim: ts=8
let b:current_syntax = "ucl"

0 comments on commit 2dc6fbd

Please sign in to comment.