ats-vim/syntax_checkers/ats/patscc.vim

39 lines
919 B
VimL
Raw Normal View History

2017-12-23 16:16:43 -05:00
if exists('g:loaded_syntastic_ats_patscc_checker')
finish
endif
let g:loaded_syntastic_ats_patscc_checker = 1
let g:syntastic_ats_patscc_exec = 'patscc'
2017-12-23 17:41:25 -05:00
function! syntastic#postprocess#Cleanup(errors) abort " {{{2
2017-12-23 17:29:14 -05:00
exec 'silent !rm -f a.out'
2017-12-23 17:35:39 -05:00
exec 'echom "here"'
2017-12-23 17:29:14 -05:00
return a:errors
endfunction " }}}2
2017-12-23 16:16:43 -05:00
function! SyntaxCheckers_ats_patscc_GetLocList() dict
let makeprg = self.makeprgBuild({
\ 'exe': self.getExec(),
2017-12-23 16:30:27 -05:00
\ 'args': '-DATS_MEMALLOC_LIBC -cleanaft',
2017-12-23 16:16:43 -05:00
\ 'fname': shellescape(expand('%') )})
2017-12-23 17:15:39 -05:00
let errorformat =
\ 'exit(ATS):%m,' .
\ '%f:%m'
2017-12-23 16:16:43 -05:00
let loclist = SyntasticMake({
\ 'makeprg': makeprg,
\ 'errorformat': errorformat })
2017-12-23 17:29:14 -05:00
return loclist
2017-12-23 16:30:27 -05:00
2017-12-23 16:16:43 -05:00
endfunction
call g:SyntasticRegistry.CreateAndRegisterChecker({
\ 'filetype': 'ats',
2017-12-23 17:29:14 -05:00
\ 'name': 'patscc',
\ 'postprocess': 'Cleanup'})