comparison src/testdir/test_cmdmods.vim @ 31335:5acc0d2cf4f7 v9.0.1001

patch 9.0.1001: classes are not documented or implemented yet Commit: https://github.com/vim/vim/commit/c1c365c1ca4881488c4fc419b4d5e579b89ef2ed Author: Bram Moolenaar <Bram@vim.org> Date: Sun Dec 4 20:13:24 2022 +0000 patch 9.0.1001: classes are not documented or implemented yet Problem: Classes are not documented or implemented yet. Solution: Make the first steps at documenting Vim9 objects, classes and interfaces. Make initial choices for the syntax. Add a skeleton implementation. Add "public" and "this" in the command table.
author Bram Moolenaar <Bram@vim.org>
date Sun, 04 Dec 2022 21:15:07 +0100
parents 360f286b5869
children cda1a8a06777
comparison
equal deleted inserted replaced
31334:c7700a3aee9b 31335:5acc0d2cf4f7
12 edit ../ex_docmd.c 12 edit ../ex_docmd.c
13 var top = search('^} cmdmods[') + 1 13 var top = search('^} cmdmods[') + 1
14 var bot = search('^};') - 1 14 var bot = search('^};') - 1
15 lines = getline(top, bot) 15 lines = getline(top, bot)
16 var mods = lines->map((_, v) => substitute(v, '.*"\(\k*\)".*', '\1', '')) 16 var mods = lines->map((_, v) => substitute(v, '.*"\(\k*\)".*', '\1', ''))
17
18 # Add the other commands that use ex_wrongmodifier.
19 mods->extend([
20 'endclass',
21 'endenum',
22 'endinterface',
23 'public',
24 'static',
25 'this',
26 ])
17 27
18 # Check the lists are equal. Convert them to a dict to get a clearer error 28 # Check the lists are equal. Convert them to a dict to get a clearer error
19 # message. 29 # message.
20 var cmds_dict = {} 30 var cmds_dict = {}
21 for v in cmds 31 for v in cmds