c0c070abaf
New "functionList" will be added beside of notepad++.exe or "%APPDATA%\Notepad++\", according the installation mode. If the portable package is used, after removing "doLocalConf.xml", the "functionList" folder should be copied manually from Notepad++ installed directory to "%APPDATA%\Notepad++\" to make function list work again. All splited files are localized in this folder with the explicit language name. "overrideMap.xml" is optional for overriding the default functionList parse rule files, and for adding UDL parse rule files. Close #4896
43 lines
1.8 KiB
XML
43 lines
1.8 KiB
XML
<?xml version="1.0" encoding="UTF-8" ?>
|
|
<!-- ==========================================================================\
|
|
|
|
|
| To learn how to make your own language parser, please check the following
|
|
| link:
|
|
| https://npp-user-manual.org/docs/function-list/
|
|
|
|
|
\=========================================================================== -->
|
|
<NotepadPlus>
|
|
<functionList>
|
|
<!-- ========================================================== [ C# ] -->
|
|
|
|
<!--
|
|
| Based on:
|
|
| http://sourceforge.net/p/notepad-plus/patches/613/
|
|
\-->
|
|
<parser
|
|
displayName="C#"
|
|
id ="csharp_class"
|
|
commentExpr="(?s:/\*.*?\*/)|(?m-s://.*?$)"
|
|
>
|
|
<classRange
|
|
mainExpr ="^[\t\x20]*((public|protected|private|internal)\s+)?(\w+\s*)?(class|struct|interface)[\t\x20]+[^\{]+\{"
|
|
openSymbole ="\{"
|
|
closeSymbole="\}"
|
|
>
|
|
<className>
|
|
<nameExpr expr="(class|struct|interface)[\t\x20]+\w+" />
|
|
<nameExpr expr="[\t\x20]+\w+" />
|
|
<nameExpr expr="\w+" />
|
|
</className>
|
|
<function
|
|
mainExpr="^[^\S\r\n]*(?<modifier1>(?:public|protected|internal|private)\s*)?(?<modifier2>(?:new|static|virtual|sealed|override|abstract|extern)\s*)?(partial\s*)?(?<type>(?!(return|if|else))\w+(?<genericType><[\w,\s<>]+>)?\s+)(?<name>\w+(?<genericNameType><[\w,\s<>]+>)?\s?)\((?<params>[\w\s,<>\[\]\:=\.]*)\)(?<ctorChain>\s*\:\s*(?:base|this)\s*\((?<ctorParams>[\w\s,<>\[\]\:=\.]*)\))?[\w\s<>\:,\(\)\[\]]*(?:\{|;)"
|
|
>
|
|
<functionName>
|
|
<funcNameExpr expr="(\w+(<[\w,\s<>]+>)?\s?)\(" />
|
|
<funcNameExpr expr="(\w+(<[\w,\s<>]+>)?\s?)" />
|
|
</functionName>
|
|
</function>
|
|
</classRange>
|
|
</parser>
|
|
</functionList>
|
|
</NotepadPlus> |