view src/po/tojavascript.vim @ 33700:275617cdd99f v9.0.2085

patch 9.0.2085: Vim9: abstract can be used in interface Commit: https://github.com/vim/vim/commit/2b358adde079d7cc8a7f42fcd5627866641c9a59 Author: Yegappan Lakshmanan <yegappan@yahoo.com> Date: Thu Nov 2 20:57:32 2023 +0100 patch 9.0.2085: Vim9: abstract can be used in interface Problem: Vim9: abstract can be used in interface Solution: Disallow the use of abstract in an interface fixes: #13456 closes: #13464 Signed-off-by: Yegappan Lakshmanan <yegappan@yahoo.com> Signed-off-by: Christian Brabandt <cb@256bit.org>
author Christian Brabandt <cb@256bit.org>
date Thu, 02 Nov 2023 21:00:05 +0100
parents 695b50472e85
children 04563887d70e
line wrap: on
line source

" Invoked with the name "vim.pot" and a list of Vim script names.
" Converts them to a .js file, stripping comments, so that xgettext works.
" Javascript is used because, like Vim, it accepts both single and double
" quoted strings.

set shortmess+=A

for name in argv()[1:]
  exe 'edit ' .. fnameescape(name)

  " Strip comments, also after :set commands.
  g/^\s*"/s/.*//
  g/^\s*set .*"/s/.*//

  " Write as .js file, xgettext recognizes them
  exe 'w! ' .. fnamemodify(name, ":t:r") .. ".js"
endfor

quit