annotate runtime/compiler/rhino.vim @ 24002:5dbed4837ea3 v8.2.2543

patch 8.2.2543: Vim9: a return inside try/catch does not restore properly Commit: https://github.com/vim/vim/commit/9cb577a68277d46cc1134ef1723e90ff5f1d1b5c Author: Bram Moolenaar <Bram@vim.org> Date: Mon Feb 22 22:45:10 2021 +0100 patch 8.2.2543: Vim9: a return inside try/catch does not restore properly Problem: Vim9: a return inside try/catch does not restore exception state properly. Solution: When there is no ":finally" jump to ":endtry". (closes #7882)
author Bram Moolenaar <Bram@vim.org>
date Mon, 22 Feb 2021 23:00:04 +0100
parents d4c7b3e9cd17
children e1df51f68736
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
22171
d4c7b3e9cd17 Update runtime files.
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
1 " Vim compiler file
d4c7b3e9cd17 Update runtime files.
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
2 " Compiler: Rhino Shell (JavaScript in Java)
d4c7b3e9cd17 Update runtime files.
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
3 " Maintainer: Doug Kearns <dougkearns@gmail.com>
d4c7b3e9cd17 Update runtime files.
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
4 " Last Change: 2019 Jul 10
d4c7b3e9cd17 Update runtime files.
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
5
d4c7b3e9cd17 Update runtime files.
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
6 if exists("current_compiler")
d4c7b3e9cd17 Update runtime files.
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
7 finish
d4c7b3e9cd17 Update runtime files.
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
8 endif
d4c7b3e9cd17 Update runtime files.
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
9 let current_compiler = "rhino"
d4c7b3e9cd17 Update runtime files.
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
10
d4c7b3e9cd17 Update runtime files.
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
11 if exists(":CompilerSet") != 2 " older Vim always used :setlocal
d4c7b3e9cd17 Update runtime files.
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
12 command -nargs=* CompilerSet setlocal <args>
d4c7b3e9cd17 Update runtime files.
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
13 endif
d4c7b3e9cd17 Update runtime files.
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
14
d4c7b3e9cd17 Update runtime files.
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
15 let s:cpo_save = &cpo
d4c7b3e9cd17 Update runtime files.
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
16 set cpo&vim
d4c7b3e9cd17 Update runtime files.
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
17
d4c7b3e9cd17 Update runtime files.
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
18 " CompilerSet makeprg=java\ -jar\ lib/rhino-X.X.XX.jar\ -w\ -strict
d4c7b3e9cd17 Update runtime files.
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
19
d4c7b3e9cd17 Update runtime files.
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
20 CompilerSet makeprg=rhino
d4c7b3e9cd17 Update runtime files.
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
21 CompilerSet errorformat=%-Gjs:\ %.%#Compilation\ produced%.%#,
d4c7b3e9cd17 Update runtime files.
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
22 \%Ejs:\ \"%f\"\\,\ line\ %l:\ %m,
d4c7b3e9cd17 Update runtime files.
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
23 \%Ejs:\ uncaught\ JavaScript\ runtime\ exception:\ %m,
d4c7b3e9cd17 Update runtime files.
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
24 \%Wjs:\ warning:\ \"%f\"\\,\ line\ %l:\ %m,
d4c7b3e9cd17 Update runtime files.
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
25 \%Zjs:\ %p^,
d4c7b3e9cd17 Update runtime files.
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
26 \%Cjs:\ %.%#,
d4c7b3e9cd17 Update runtime files.
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
27 \%-G%.%#
d4c7b3e9cd17 Update runtime files.
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
28
d4c7b3e9cd17 Update runtime files.
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
29 let &cpo = s:cpo_save
d4c7b3e9cd17 Update runtime files.
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
30 unlet s:cpo_save