Menu

Problem with multiline function definition

Alny
2007-05-10
2013-05-21
  • Alny

    Alny - 2007-05-10

    when Function List plugin parse the function like this

    void sayWord
    (
        string word,
        string delimeter
    )
    {
        cout << word
    }

    there is no functions in the list.

     
    • Jens Lorenz

      Jens Lorenz - 2007-05-14

      Yes, because it it the ugliest code I had ever seen ;). My parser need the open brace in same line as function name. If you want to have every parameter in newline use this:

      void sayWord (
         string word,
         string delimeter)
      {
         cout << word
      }

      BTW: Function List is not a compiler.

      Best Regards
      Jens

       
    • Alny

      Alny - 2007-05-16

      I agree with you that this code looks terrible. But you need to agree also that notepad++ used more often to look at the code than writing the code. So we can't make a requirements to the code, that we are looking to, because it is not our code, and we have no reason to modify it.
      Ok. So the second question is - can I create a rule for your parser, that will wait for the open brace at the next line, or it is impossible also?

       

Log in to post a comment.

MongoDB Logo MongoDB