Notepad++ provides a function list.
I'm currently using Notepad++ 6.5
functionList.xml defines parsers for function names using regular expressions.
The following code defines the parser for c functions
<parser id="c_function" displayName="C source" commentExpr="((/\*.*?\*)/|(//.*?$))">
<function
mainExpr="^[\t ]*((static|const|virtual)[\s]+)?[\w:]+([\s]+[\w]+)?([\s]+|\*[\s]+|[\s]+\*|[\s]+\*[\s]+)([\w_]+[\s]*::)?(?!(if|while|for))[\w_]+[\s]*\([^\)\(]*\)([\s]*const[\s]*)?[\n\s]*\{"
displayMode="$functionName">
<functionName>
<nameExpr expr="(?!(if|while|for))[\w_~]+[\s]*\("/>
<nameExpr expr="(?!(if|while|for))[\w_~]+"/>
</functionName> </function>
</parser>
I tried my regex online and everything was fine. But it does not work for the functionList.xml somehow. The function list stays empty.
How would this look like for a Lua function?
Here's my try:
<parser id="lua_function" displayName="Lua Function" commentExpr="((--\[\[\*.*?\*)/|(--.*[\n\s\w\t]*\]\]))">
<function
mainExpr="^[\t\s]*(function)[\s]+[\w]+\("
displayMode="$functionName">
<functionName>
<nameExpr expr="(?:(function[\s]+))[\w]+"/>
</functionName>
</function>
</parser>