Notepad++ Custom Function List (Basic)



I am trying to use Notepad++ as my new editor for PicBasic code. I want to be able to use the function list capability, but I have no experience with XML and the Notepad++ website does not explain how to create your own function list parser very well.


For example, an xml function header would look like:



<parser id="xml_node"


The Notepad++ parser looks like this:



<parser id="xml_node" displayName="XML Node" commentExpr="&lt;!--([^-]|-(?!-&gt;))*--&gt;">
<!-- Only match nodes with at least one attribute -->
<function
mainExpr="&lt;[\w\?]+[\t ]+\w+[\t ]*=[\t ]*&quot;[^&quot;]+&quot;"
displayMode="$functionName">
<functionName>
<nameExpr expr="[^&lt;]*"/>
</functionName>
</function>
</parser>


In Basic I have function headers that look like this:



Function1:


How do I write the parser to pickup these function headers? If that doesn't work for some reason, I could have a title comment above each function that looks like:



;Function1
'Funtcion1


I do know about the Named Bookmark plugin, but it is a much slower way of navigating. If you can please write your answer in a way that will help others who see this to know how to write a parser for their own code language.


Edit: The Named Bookmark feature only works in C++,HTML,... not in a custom language file. So I can't even use that.


No comments:

Post a Comment