Patch 9.0.1083
Problem:    Empty and comment lines in a class cause an error.
Solution:   Skip empty and comment lines. (closes #11734)
Files:      src/vim9class.c, src/testdir/test_vim9_class.vim


*** ../vim-9.0.1082/src/vim9class.c     2022-12-19 12:18:06.404218717 +0000
--- src/vim9class.c     2022-12-20 13:34:57.060327373 +0000
***************
*** 248,253 ****
--- 248,263 ----
            break;
        char_u *line = skipwhite(theline);
  
+       // Skip empty and comment lines.
+       if (*line == NUL)
+           continue;
+       if (*line == '#')
+       {
+           if (vim9_bad_comment(line))
+               break;
+           continue;
+       }
+ 
        char_u *p = line;
        if (checkforcmd(&p, "endclass", 4))
        {
*** ../vim-9.0.1082/src/testdir/test_vim9_class.vim     2022-12-18 
21:42:49.014716925 +0000
--- src/testdir/test_vim9_class.vim     2022-12-20 13:37:34.984409558 +0000
***************
*** 131,136 ****
--- 131,137 ----
          this.lnum: number
          this.col: number
  
+         # make a nicely formatted string
          def ToString(): string
            return $'({this.lnum}, {this.col})'
          enddef
***************
*** 155,160 ****
--- 156,162 ----
          this.lnum: number = 1
          this.col: number = 1
  
+         # constructor with only the line number
          def new(lnum: number)
            this.lnum = lnum
          enddef
*** ../vim-9.0.1082/src/version.c       2022-12-19 20:42:45.884055099 +0000
--- src/version.c       2022-12-20 13:35:53.608365913 +0000
***************
*** 697,698 ****
--- 697,700 ----
  {   /* Add new patch number below this line */
+ /**/
+     1083,
  /**/

-- 
ARTHUR:  Be quiet!
DENNIS:  --but by a two-thirds majority in the case of more--
ARTHUR:  Be quiet!  I order you to be quiet!
WOMAN:   Order, eh -- who does he think he is?
ARTHUR:  I am your king!
                                  The Quest for the Holy Grail (Monty Python)

 /// Bram Moolenaar -- [email protected] -- http://www.Moolenaar.net   \\\
///                                                                      \\\
\\\        sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ ///
 \\\            help me help AIDS victims -- http://ICCF-Holland.org    ///

-- 
-- 
You received this message from the "vim_dev" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php

--- 
You received this message because you are subscribed to the Google Groups 
"vim_dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/vim_dev/20221220133857.B5D7D1C06DC%40moolenaar.net.

Raspunde prin e-mail lui