mirror of
https://github.com/vim/vim.git
synced 2025-09-29 04:34:16 -04:00
runtime(vim): Distinguish Vim9 builtin object methods from namesake builtin functions (#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>
This commit is contained in:
20
runtime/syntax/testdir/dumps/vim_object_methods_01.dump
Normal file
20
runtime/syntax/testdir/dumps/vim_object_methods_01.dump
Normal file
@@ -0,0 +1,20 @@
|
||||
| +0&#ffffff0@74
|
||||
@8|d+0#af5f00255&|e|f| +0#0000000&|e+0#0000001#ffff4012|m|p|t|y|(+0#e000e06#ffffff0|)|:+0#0000000&| |b+0#00e0003&|o@1|l| +0#0000000&@49
|
||||
@16|r+0#af5f00255&|e|t|u|r|n| +0#0000000&|f+0#00e0e07&|a|l|s|e| +0#0000000&@46
|
||||
@8|e+0#af5f00255&|n|d@1|e|f| +0#0000000&@60
|
||||
@8|d+0#af5f00255&|e|f| +0#0000000&|l+0#0000001#ffff4012|e|n|(+0#e000e06#ffffff0|)|:+0#0000000&| |n+0#00e0003&|u|m|b|e|r| +0#0000000&@49
|
||||
@16>r+0#af5f00255&|e|t|u|r|n| +0#0000000&|2+0#e000002&| +0#0000000&@50
|
||||
@8|e+0#af5f00255&|n|d@1|e|f| +0#0000000&@60
|
||||
@8|d+0#af5f00255&|e|f| +0#0000000&|s+0#0000001#ffff4012|t|r|i|n|g|(+0#e000e06#ffffff0|)|:+0#0000000&| |s+0#00e0003&|t|r|i|n|g| +0#0000000&@46
|
||||
@16|r+0#af5f00255&|e|t|u|r|n| +0#0000000&|p+0#00e0e07&|r|i|n|t|f|(+0#e000e06&|'+0#e000002&|(|%|s|,| |%|s|)|'|,+0#0000000&| |t+0#00e0e07&|h|i|s|.+0#af5f00255&|a+0#00e0e07&|,+0#0000000&| |t+0#00e0e07&|h|i|s|.+0#af5f00255&|b+0#00e0e07&|)+0#e000e06&| +0#0000000&@17
|
||||
@8|e+0#af5f00255&|n|d@1|e|f| +0#0000000&@60
|
||||
|e+0#af5f00255&|n|d|c|l|a|s@1| +0#0000000&@66
|
||||
@75
|
||||
|e+0#af5f00255&|n|u|m| +0#0000000&|M|a|r|k|e|r|E|n|u|m|T|e|s|t| @55
|
||||
@8|I|N|S|T|A|N|C|E| @58
|
||||
@75
|
||||
@8|d+0#af5f00255&|e|f| +0#0000000&|N|o|O|p|(+0#e000e06&|)| +0#0000000&@56
|
||||
@8|e+0#af5f00255&|n|d@1|e|f| +0#0000000&@60
|
||||
@75
|
||||
@8|d+0#af5f00255&|e|f| +0#0000000&|e+0#0000001#ffff4012|m|p|t|y|(+0#e000e06#ffffff0|)|:+0#0000000&| |b+0#00e0003&|o@1|l| +0#0000000&@49
|
||||
@57|1|9|,|3|-|1|7| @6|3|5|%|
|
Reference in New Issue
Block a user