[NEW] Add shell script parser for the function list.

git-svn-id: svn://svn.tuxfamily.org/svnroot/notepadplus/repository/trunk@1231 f5eea248-9336-0410-98b8-ebc06183d4e3
This commit is contained in:
Don Ho 2014-05-01 12:59:04 +00:00
parent 73603b2357
commit e680fca05b
4 changed files with 13 additions and 3 deletions

View File

@ -2110,7 +2110,7 @@ void Notepad_plus::setUniModeText()
case uni16LE_NoBOM:
uniModeTextString = TEXT("UCS-2 LE w/o BOM"); break;
case uniCookie:
uniModeTextString = TEXT("ANSI as UTF-8"); break;
uniModeTextString = TEXT("UTF-8 w/o BOM"); break;
default :
uniModeTextString = TEXT("ANSI");
}

View File

@ -33,7 +33,7 @@
#include "scilexer.h"
#endif //SCILEXER_H
const int langNameLenMax = 16;
const int langNameLenMax = 33;
const int extsLenMax = 256;
const int max_char = 1024*30;

View File

@ -157,7 +157,7 @@ STYLE DS_SETFONT | DS_FIXEDSYS | DS_CONTROL | WS_CHILD
FONT 8, "MS Shell Dlg", 0, 0, 0x1
BEGIN
GROUPBOX "New Document",IDC_NEWDOCUMENT_GR_STATIC,50,8,354,161,BS_CENTER
GROUPBOX "Format",IDC_FORMAT_GB_STATIC,68,29,129,79,BS_CENTER
GROUPBOX "Format (Line ending)",IDC_FORMAT_GB_STATIC,68,29,129,79,BS_CENTER
CONTROL "Windows",IDC_RADIO_F_WIN,"Button",BS_AUTORADIOBUTTON | WS_GROUP,75,48,50,10
CONTROL "Old Mac",IDC_RADIO_F_MAC,"Button",BS_AUTORADIOBUTTON,75,64,50,10
CONTROL "Unix/OSX",IDC_RADIO_F_UNIX,"Button",BS_AUTORADIOBUTTON,75,81,50,10

View File

@ -27,6 +27,7 @@ http://notepad-plus-plus.org/features/function-list.html
<association langID="13" id="ini_section"/>
<association langID="19" id="js_function"/>
<association langID="21" id="perl_function"/>
<association langID="26" id="bash_function"/>
<association langID="28" id="nsis_syntax"/>
<!--
if langID cannot be found above, you can still set the file extensions
@ -201,6 +202,15 @@ http://notepad-plus-plus.org/features/function-list.html
<nameExpr expr="[\w_]+(?=[\s]*::)"/>
</className>
</function>
</parser>
<parser id="bash_function" displayName="Shell" commentExpr="(#.*?$)">
<function
mainExpr="^[\t ]*(function[\t\r\n ]*)?([a-zA-Z0-9_])+[\t\r\n ]*(\([^\)]*\))?[\t\r\n ]*(\{)[^(\})\r\n\t ]*"
displayMode="$functionName">
<functionName>
<nameExpr expr="[^{]*"/>
</functionName>
</function>
</parser>
</parsers>