comparison src/vim9compile.c @ 29008:49d8b54802f3 v8.2.5026

patch 8.2.5026: Vim9: a few lines not covered by tests Commit: https://github.com/vim/vim/commit/31d9948e3a2529c2f619d56bdb48291dc261233d Author: Bram Moolenaar <Bram@vim.org> Date: Thu May 26 22:24:43 2022 +0100 patch 8.2.5026: Vim9: a few lines not covered by tests Problem: Vim9: a few lines not covered by tests. Solution: Delete dead code. Add a few test cases. make "12->func()" work.
author Bram Moolenaar <Bram@vim.org>
date Thu, 26 May 2022 23:30:05 +0200
parents 0e9642706a59
children fab3a46d0af7
comparison
equal deleted inserted replaced
29007:0e8c870971f7 29008:49d8b54802f3
2999 * COMMAND after range 2999 * COMMAND after range
3000 * 'text'->func() should not be confused with 'a mark 3000 * 'text'->func() should not be confused with 'a mark
3001 * 0z1234->func() should not be confused with a zero line number 3001 * 0z1234->func() should not be confused with a zero line number
3002 * "++nr" and "--nr" are eval commands 3002 * "++nr" and "--nr" are eval commands
3003 * in "$ENV->func()" the "$" is not a range 3003 * in "$ENV->func()" the "$" is not a range
3004 * "123->func()" is a method call
3004 */ 3005 */
3005 cmd = ea.cmd; 3006 cmd = ea.cmd;
3006 if ((*cmd != '$' || starts_with_colon) 3007 if ((*cmd != '$' || starts_with_colon)
3007 && (starts_with_colon 3008 && (starts_with_colon
3008 || !(*cmd == '\'' 3009 || !(*cmd == '\''
3009 || (cmd[0] == '0' && cmd[1] == 'z') 3010 || (cmd[0] == '0' && cmd[1] == 'z')
3010 || (cmd[0] != NUL && cmd[0] == cmd[1] 3011 || (cmd[0] != NUL && cmd[0] == cmd[1]
3011 && (*cmd == '+' || *cmd == '-'))))) 3012 && (*cmd == '+' || *cmd == '-'))
3013 || number_method(cmd))))
3012 { 3014 {
3013 ea.cmd = skip_range(ea.cmd, TRUE, NULL); 3015 ea.cmd = skip_range(ea.cmd, TRUE, NULL);
3014 if (ea.cmd > cmd) 3016 if (ea.cmd > cmd)
3015 { 3017 {
3016 if (!starts_with_colon 3018 if (!starts_with_colon