Loading ...
Sorry, an error occurred while loading the content.

Re: `match()` with branches [and a patch]

Expand Messages
  • Bram Moolenaar
    ... That s a good restriction. Suppose a .h file is C++ and recognized as objective C, how bad would the effect be? I assume that objective C is quite similar
    Message 1 of 6 , Dec 2, 2007
    • 0 Attachment
      Nico Weber wrote:

      > > I wonder how often the detection will fail. "@interface" and "@end"
      > > could appear in a comment of a C or C++ file, at least. Esp. when
      > > using
      > > something like doxygen.
      >
      > What about '^@interface\|^@end' (and maybe throw in a '\|^@class' at
      > the end for good measure)?

      That's a good restriction.

      Suppose a .h file is C++ and recognized as objective C, how bad would
      the effect be? I assume that objective C is quite similar to C++.

      There are a few mistakes, you can use this to try out:

      http://www.google.com/codesearch?hl=en&q=+file:%5C.h+%5E%40(interface%7Cclass%7Cend)&sa=N

      Note that you need to look at the file to verify the type. Google Code
      Search also makes mistakes.

      --
      hundred-and-one symptoms of being an internet addict:
      173. You keep tracking down the email addresses of all your friends
      (even childhood friends).

      /// Bram Moolenaar -- Bram@... -- 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
      -~----------~----~----~----~------~----~------~--~---
    Your message has been successfully submitted and would be delivered to recipients shortly.