• Login
Community
  • Login

Troubles while creating a custon functionList.xml

Scheduled Pinned Locked Moved Help wanted · · · – – – · · ·
2 Posts 1 Posters 817 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.
  • A
    Andrea Del Prete
    last edited by Jul 10, 2018, 12:11 PM

    Hi guys,
    I’m trying to set up the functionList.xml in order to detect two types of entries in the custom language that we have to use.

    The structures that I would like to identify looks more or less as the following:

    my_ref_function(“some text”);

    – a comment
    FUNCTION func_name() : VOID

    END FUNCTION

    my_ref_function(“some more text”);

    FUNCTION another_function() : VOID

    END FUNCTION

    FUNCTION a_third_function() : VOID

    END FUNCTION

    I would like to list the names of all the FUNCTION and the text that appears as an argument to my_ref_function()
    So far, I have come up with the following:

    <parser id=“tesla_function” displayName=“TAL source” commentExpr=“(–.?$)“>
    <function mainExpr=”(?:FUNCTION|my_ref_function()[ \t]
    ([0-9A-z_])(?(.))” displayMode=“$functionName”>
    <functionName>
    <nameExpr expr=“.*”/>
    </functionName>
    </function>
    </parser>

    But the list is not properly formatted unless a comment is placed after each line that should be listed.
    Can anyone give me some suggestions on how to proceed?

    Thanks a lot!

    1 Reply Last reply Reply Quote 0
    • A
      Andrea Del Prete
      last edited by Jul 10, 2018, 3:24 PM

      I forgot to add an image of how the function list parses the file with the configuration above:

      https://pasteboard.co/HtPeByg.png

      1 Reply Last reply Reply Quote 0
      2 out of 2
      • First post
        2/2
        Last post
      The Community of users of the Notepad++ text editor.
      Powered by NodeBB | Contributors