Markus Heidelberg wrote:
> I have noticed, that the % command to match C-style comments, doesn't work
> completely with a line like this:
> /* comment1 *//* comment2 */
>
> Searching backwards from the 2nd */ doesn't work, because a // comment is
> found and /* comments thereafter are ignored.
>
> I've created a patch for the function check_linecomment(), that doesn't
> consider a *//* construct to be a // comment.
Makes sense. It's probably rare, but your fix doesn't have much of a
negative side effect. It would fail for:
a = b *//* comment
4;
The C code of this is: a = b * 4;
But that is weird enough to ignore (had to run it through the compiler
to check that it's actually valid C syntax :-).
--
>From the classified section of a city newspaper:
Dog for sale: eats anything and is fond of children.
/// Bram Moolenaar -- [EMAIL PROTECTED] -- http://www.Moolenaar.net \\\
/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
\\\ download, build and distribute -- http://www.A-A-P.org ///
\\\ help me help AIDS victims -- http://ICCF-Holland.org ///
--~--~---------~--~----~------------~-------~--~----~
You received this message from the "vim_dev" maillist.
For more information, visit http://www.vim.org/maillist.php
-~----------~----~----~----~------~----~------~--~---