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 490 Views 2 Watching
    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 Offline
      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 Offline
        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 Online
          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

          Hello! It looks like you're interested in this conversation, but you don't have an account yet.

          Getting fed up of having to scroll through the same posts each visit? When you register for an account, you'll always come back to exactly where you were before, and choose to be notified of new replies (either via email, or push notification). You'll also be able to save bookmarks and upvote posts to show your appreciation to other community members.

          With your input, this post could be even better 💗

          Register Login
          • First post
            Last post
          The Community of users of the Notepad++ text editor.
          Powered by NodeBB | Contributors