Mercurial > vim
view runtime/syntax/generator/README.md @ 34701:de9d4e6b03d0
runtime(vim): Distinguish Vim9 builtin object methods from namesake builtin functions (#14348)
Commit: https://github.com/vim/vim/commit/80aabaab6636faa7cec461acc4b1fcc3a4c89376
Author: Aliaksei Budavei <32549825+zzzyxwvut@users.noreply.github.com>
Date: Sun Mar 31 19:26:32 2024 +0300
runtime(vim): Distinguish Vim9 builtin object methods from namesake builtin functions (https://github.com/vim/vim/issues/14348)
Currently, the overriding object method definitions are
matched as vimFunctionError (:help builtin-object-methods,
v9.1.0148).
For example:
------------------------------------------------------------
vim9script
class Test
def string(): string
return "Test"
enddef
endclass
echo string(Test.new()) == Test.new().string()
------------------------------------------------------------
Instead, let's introduce a new syntax group vimMethodName
and make these methods its members. In order to emphasise
the link between the overriding methods and the overridden
functions for highlighting, vimMethodName is linked by
default to vimFuncName.
Signed-off-by: Aliaksei Budavei <0x000c70@gmail.com>
Signed-off-by: Doug Kearns <dougkearns@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
author | Christian Brabandt <cb@256bit.org> |
---|---|
date | Sun, 31 Mar 2024 18:30:03 +0200 |
parents | 776cb5c73d6f |
children | ddf626d18d9e |
line wrap: on
line source
# Generator of Vim Script Syntax File This directory contains a Vim Script generator, that will parse the Vim source file and generate a vim.vim syntax file. Files in this directory where copied from https://github.com/vim-jp/syntax-vim-ex/ and included here on Feb, 13th, 2024 for the Vim Project. - Maintainer: Hirohito Higashi - License: Vim License ## How to generate $ make This will generate `../vim.vim` ## Files Name |Description ---------------------|------------------------------------------------------ `Makefile` |Makefile to generate ../vim.vim `README.md` |This file `gen_syntax_vim.vim` |Script to generate vim.vim `update_date.vim` |Script to update "Last Change:" `vim.vim.base` |Template for vim.vim