Community
    • Login

    RegEx for functionlist/php.xml => Detection of a function for Showing in Functionlist

    Scheduled Pinned Locked Moved Help wanted · · · – – – · · ·
    3 Posts 3 Posters 119 Views
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • Tom_1978T
      Tom_1978
      last edited by

      Hello.

      I have been using version 7.8.4 so far.

      For better clarity in long procedural PHP source code, I have made a small additionn. All lines of code that begin with “###mainblock:” are displayed like a function in the function list on a right area.

      I have extended the functionList.xml under functionList > parser > function as follows:

      <function mainExpr=“^\s*(function|###mainblock:)\s+[\.\w]+\s*\(”>
      

      Unfortunately, this no longer works in version 8.7.4. The RegEx for source code parsing has been greatly expanded there. There I have the file functionlist/php.xml.

      If I extend the MainExpression there under functionList > parser > function accordingly:

      (?-i:function|###mainblock:)\s+
      

      But it does not work. It is not displayed as an entry in the function list. I suspect it is because of the # , which is why the whole line is treated as a comment. But this is necessary, because it is only comment. After 4 hours of trial and error, I have to give up and hope for a little help from you. please

      What I have to do so that in version 8.7.4 a line like ###mainblock(‘my_title’) {} is displayed in the function list?

      Terry RT 1 Reply Last reply Reply Quote 0
      • Terry RT
        Terry R @Tom_1978
        last edited by

        @Tom_1978

        I released only 1 of your posts, as the 2nd was a repeat of this post. The forum has had to implement the post queue due to spammers. So if posting again, just wait for it to be released.

        Terry

        PeterJonesP 1 Reply Last reply Reply Quote 0
        • PeterJonesP
          PeterJones @Terry R
          last edited by

          @Terry-R

          Sorry, I didn’t see it was a second copy when I approved the second.

          Conversation will continue in the other

          1 Reply Last reply Reply Quote 0
          • PeterJonesP PeterJones locked this topic on
          • First post
            Last post
          The Community of users of the Notepad++ text editor.
          Powered by NodeBB | Contributors