annotate runtime/compiler/ocaml.vim @ 16668:81be817c9d9a v8.1.1336

patch 8.1.1336: some eval functionality is not covered by tests commit https://github.com/vim/vim/commit/17aca707f92235b6f962e637e8073162d18e6de2 Author: Bram Moolenaar <Bram@vim.org> Date: Thu May 16 22:24:55 2019 +0200 patch 8.1.1336: some eval functionality is not covered by tests Problem: Some eval functionality is not covered by tests. Solution: Add a few more test cases. (Masato Nishihata, closes https://github.com/vim/vim/issues/4374)
author Bram Moolenaar <Bram@vim.org>
date Thu, 16 May 2019 22:30:06 +0200
parents c458ff35497e
children 432714f5c0f7
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
5055
c458ff35497e Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
1 " Vim Compiler File
c458ff35497e Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
2 " Compiler: ocaml
c458ff35497e Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
3 " Maintainer: See ftplugin/ocaml.vim (?)
c458ff35497e Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
4 " Last Change: June 2013 by Marc Weber
c458ff35497e Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
5 "
c458ff35497e Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
6 " Marc Weber's comments:
c458ff35497e Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
7 " Setting makeprg doesn't make sense, because there is ocamlc, ocamlopt,
c458ff35497e Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
8 " ocamake and whatnot. So which one to use?
c458ff35497e Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
9 "
c458ff35497e Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
10 " This error format was moved from ftplugin/ocaml.vim to this file,
c458ff35497e Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
11 " because ftplugin is the wrong file to set an error format
c458ff35497e Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
12 " and the error format itself is annoying because it joins many lines in this
c458ff35497e Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
13 " error case:
c458ff35497e Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
14 "
c458ff35497e Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
15 " Error: The implementation foo.ml does not match the interface foo.cmi:
c458ff35497e Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
16 " Modules do not match case.
c458ff35497e Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
17 "
c458ff35497e Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
18 " So having it here makes people opt-in
c458ff35497e Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
19
c458ff35497e Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
20
c458ff35497e Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
21 if exists("current_compiler")
c458ff35497e Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
22 finish
c458ff35497e Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
23 endif
c458ff35497e Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
24 let current_compiler = "ocaml"
c458ff35497e Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
25
c458ff35497e Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
26 let s:cpo_save = &cpo
c458ff35497e Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
27 set cpo&vim
c458ff35497e Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
28
c458ff35497e Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
29 CompilerSet errorformat =
c458ff35497e Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
30 \%EFile\ \"%f\"\\,\ line\ %l\\,\ characters\ %c-%*\\d:,
c458ff35497e Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
31 \%EFile\ \"%f\"\\,\ line\ %l\\,\ character\ %c:%m,
c458ff35497e Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
32 \%+EReference\ to\ unbound\ regexp\ name\ %m,
c458ff35497e Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
33 \%Eocamlyacc:\ e\ -\ line\ %l\ of\ \"%f\"\\,\ %m,
c458ff35497e Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
34 \%Wocamlyacc:\ w\ -\ %m,
c458ff35497e Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
35 \%-Zmake%.%#,
c458ff35497e Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
36 \%C%m,
c458ff35497e Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
37 \%D%*\\a[%*\\d]:\ Entering\ directory\ `%f',
c458ff35497e Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
38 \%X%*\\a[%*\\d]:\ Leaving\ directory\ `%f',
c458ff35497e Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
39 \%D%*\\a:\ Entering\ directory\ `%f',
c458ff35497e Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
40 \%X%*\\a:\ Leaving\ directory\ `%f',
c458ff35497e Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
41 \%DMaking\ %*\\a\ in\ %f
c458ff35497e Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
42
c458ff35497e Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
43 let &cpo = s:cpo_save
c458ff35497e Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
44 unlet s:cpo_save