@netoale-netoale This worked fairly well, thank you, but was picking up a few keywords i didn’t want [if, for, switch, …etc]. If you’re having a similar issue, i got Claude to improve it like so:
<parser displayName="JavaScript" id ="javascript_function" commentExpr="(?s:/\*.*?\*/)|(?m-s://.*?$)" > <!-- <classRange>, ES6 "class" Syntax inspired of typescript : https://github.com/chai2010/notepadplus-typescript/blob/master/functionList.xml --> <classRange mainExpr="^\s*(export\s+)?(class|interface)\s+\w+\s*((extends|implements)\s+(\w|\s|,|\.|[^{])*)?\{" openSymbole = "\{" closeSymbole = "\}" displayMode="node"> <className> <nameExpr expr="(export\s+)?(class|interface)\s+\w+"/> <nameExpr expr="(class|interface)\s+\w+"/> <nameExpr expr="\s+\w+"/> <nameExpr expr="\w+"/> </className> <!-- Indent only support tab/2space/4space!!! --> <!-- tab/2space is best choice! --> <!-- regexp: ^(\t|[ ]{2,4}) --> <function mainExpr="(^(\t|[ ]{2,4})((static)\s+)+(?!(if|for|while|do|switch|try|catch|finally|return|break|continue|var|let|const|function|class|import|export|default|throw|delete|typeof|instanceof|in|new|this|super|true|false|null|undefined|async|await|yield|with|debugger|case|else|elseif|endif)\b)[A-Za-z_$][\w$]*\s*(\(|\=|:|\?))|(^(\t|[ ]{2,4})(?!(if|for|while|do|switch|try|catch|finally|return|break|continue|var|let|const|function|class|import|export|default|throw|delete|typeof|instanceof|in|new|this|super|true|false|null|undefined|async|await|yield|with|debugger|case|else|elseif|endif)\b)[A-Za-z_$][\w$]*\s*(\(|:|\=|\?))"> <functionName> <funcNameExpr expr="(^(\t|[ ]{2,4})((static)\s+)+(?!(if|for|while|do|switch|try|catch|finally|return|break|continue|var|let|const|function|class|import|export|default|throw|delete|typeof|instanceof|in|new|this|super|true|false|null|undefined|async|await|yield|with|debugger|case|else|elseif|endif)\b)[A-Za-z_$][\w$]*\s*(\(|\=|:|\?))|([A-Za-z_$][\w$]*\s*(\(|:|\=|\?))"/> <funcNameExpr expr="(\s+[A-Za-z_$][\w$]*\s*(\(|\=|:|\?))|([A-Za-z_$][\w$]*\s*(\(|:|\=|\?))"/> <funcNameExpr expr="(\s+[A-Za-z_$][\w$]*\s*(\(|\=|:|\?))|([A-Za-z_$][\w$]*)"/> <funcNameExpr expr="(\s+[A-Za-z_$][\w$]*)|([A-Za-z_$][\w$]*)"/> <funcNameExpr expr="[A-Za-z_$][\w$]*"/> </functionName> </function> </classRange> <!-- <classRange>, "prototype" syntax imported from :https://community.notepad-plus-plus.org/topic/8647/configure-function-list-to-show-javascript-class-functions-created-with-prototype --> <classRange mainExpr="^[\t ]*([_A-Za-z]?[\w_]*)(\.prototype)+[\s]+(=)+[\s]*\{" openSymbole = "\{" closeSymbole = "\}" displayMode="node" > <className> <nameExpr expr="[_A-Za-z]+[\w_]*"/> </className> <function mainExpr="^[\t ]*([_A-Za-z]?[\w_])+[\s]*+:+[\s]*+function+[\s]*\("> <functionName> <funcNameExpr expr="^[\t ]*([_A-Za-z]?[\w_]*)"/> </functionName> </function> </classRange> <!-- Original notepad++ functionlist --> <function mainExpr="((^|\s+|[;\}\.])([A-Za-z_$][\w$]*\.)*[A-Za-z_$][\w$]*\s*[=:]|^|[\s;\}]+)\s*function(\s+[A-Za-z_$][\w$]*)?\s*\([^\)\(]*\)[\n\s]*\{" > <functionName> <nameExpr expr="[A-Za-z_$][\w$]*\s*[=:]|[A-Za-z_$][\w$]*\s*\(" /> <nameExpr expr="[A-Za-z_$][\w$]*" /> </functionName> <className> <nameExpr expr="([A-Za-z_$][\w$]*\.)*[A-Za-z_$][\w$]*\." /> <nameExpr expr="([A-Za-z_$][\w$]*\.)*[A-Za-z_$][\w$]*" /> </className> </function> </parser>