Menu

adding pattern rule to function list

2008-03-05
2012-11-13
  • Nobody/Anonymous

    Hi,

    I am trying to add a rule to the function list plugin to include the following function in C language. Can anyone tell me how to do that? I tried to play around with the pattern's but cannot get the part after the function name parsed. I was reading on Scintilla editor pattern matching that the patterns are matched with the line feeds and carriage returns removed. Therefore, we can never match \n and \r. If anyone has found a solution could you please post the xml configuration?

    void foo
    (
       int x
    )

    Thanks in advance.

     
    • Nobody/Anonymous

      Function list can only parsing functions with this style.

      void foo(
      int x
      )
      ...

      This is a limitation of Scintilla.

      Best Regards
      Jens

       
    • Nobody/Anonymous

      @Jens:
      Last time I asked you about this problem you said you wouldn't do anything about it because you disapproved of this coding style. And now you say it's a limitation of Scintilla? But if, as the OP says, Scintilla matches with CR/LF removed, wouldn't that mean that "foo [CRLF] (..." is treated as "foo [SPACE] (..."? Or am I getting this wrong? Anyway, without accepting the newline before the params list, the Function List plugin is only of limited use, as I cannot be sure that ALL functions are indeed listed. I was hoping that version 2 of the plugin would (permit to) solve this problem, though.

      Greetings,
      Thomas