parent
8aeb6f3f20
commit
cfa57b6818
@ -39,7 +39,7 @@ enum LangType {L_TEXT, L_PHP , L_C, L_CPP, L_CS, L_OBJC, L_JAVA, L_RC,\
|
||||
L_ASM, L_DIFF, L_PROPS, L_PS, L_RUBY, L_SMALLTALK, L_VHDL, L_KIX, L_AU3,\
|
||||
L_CAML, L_ADA, L_VERILOG, L_MATLAB, L_HASKELL, L_INNO, L_SEARCHRESULT,\
|
||||
L_CMAKE, L_YAML, L_COBOL, L_GUI4CLI, L_D, L_POWERSHELL, L_R, L_JSP,\
|
||||
L_COFFEESCRIPT, L_JSON, L_JAVASCRIPT,\
|
||||
L_COFFEESCRIPT, L_JSON, L_JAVASCRIPT, L_FORTRAN_77,\
|
||||
// Don't use L_JS, use L_JAVASCRIPT instead
|
||||
// The end of enumated language type, so it should be always at the end
|
||||
L_EXTERNAL};
|
||||
|
@ -2626,6 +2626,8 @@ enum LangType Notepad_plus::menuID2LangType(int cmdID)
|
||||
return L_TEX;
|
||||
case IDM_LANG_FORTRAN :
|
||||
return L_FORTRAN;
|
||||
case IDM_LANG_FORTRAN_77 :
|
||||
return L_FORTRAN_77;
|
||||
case IDM_LANG_BASH :
|
||||
return L_BASH;
|
||||
case IDM_LANG_FLASH :
|
||||
@ -3786,7 +3788,7 @@ bool Notepad_plus::doBlockComment(comment_mode currCommentMode)
|
||||
TCHAR* linebuf = new TCHAR[linebufferSize];
|
||||
|
||||
Lang *lang = _pEditView->getCurrentBuffer()->getCurrentLang();
|
||||
bool isFortran = lang == NULL?false:lang->_langID == L_FORTRAN;
|
||||
bool isFortran = lang == NULL?false:lang->_langID == L_FORTRAN_77;
|
||||
if (!isFortran)
|
||||
lineIndent = _pEditView->execute(SCI_GETLINEINDENTPOSITION, i);
|
||||
_pEditView->getGenericText(linebuf, linebufferSize, lineIndent, lineEnd);
|
||||
|
@ -738,7 +738,11 @@ BEGIN
|
||||
MENUITEM "D", IDM_LANG_D
|
||||
MENUITEM "Diff", IDM_LANG_DIFF
|
||||
END
|
||||
MENUITEM "Fortran", IDM_LANG_FORTRAN
|
||||
POPUP "F"
|
||||
BEGIN
|
||||
MENUITEM "Fortran (free form)", IDM_LANG_FORTRAN
|
||||
MENUITEM "Fortran (fixed form)", IDM_LANG_FORTRAN_77
|
||||
END
|
||||
MENUITEM "Gui4Cli", IDM_LANG_GUI4CLI
|
||||
POPUP "H"
|
||||
BEGIN
|
||||
|
@ -2443,6 +2443,7 @@ void Notepad_plus::command(int id)
|
||||
case IDM_LANG_INI :
|
||||
case IDM_LANG_TEX :
|
||||
case IDM_LANG_FORTRAN :
|
||||
case IDM_LANG_FORTRAN_77 :
|
||||
case IDM_LANG_BASH :
|
||||
case IDM_LANG_FLASH :
|
||||
case IDM_LANG_NSIS :
|
||||
|
@ -104,7 +104,7 @@ LanguageName ScintillaEditView::langNames[L_EXTERNAL+1] = {
|
||||
{TEXT("python"), TEXT("Python"), TEXT("Python file"), L_PYTHON, SCLEX_PYTHON},
|
||||
{TEXT("lua"), TEXT("Lua"), TEXT("Lua source File"), L_LUA, SCLEX_LUA},
|
||||
{TEXT("tex"), TEXT("TeX"), TEXT("TeX file"), L_TEX, SCLEX_TEX},
|
||||
{TEXT("fortran"), TEXT("Fortran"), TEXT("Fortran source file"), L_FORTRAN, SCLEX_FORTRAN},
|
||||
{TEXT("fortran"), TEXT("Fortran free form"), TEXT("Fortran free form source file"), L_FORTRAN, SCLEX_FORTRAN},
|
||||
{TEXT("bash"), TEXT("Shell"), TEXT("Unix script file"), L_BASH, SCLEX_BASH},
|
||||
{TEXT("actionscript"), TEXT("ActionScript"), TEXT("Flash ActionScript file"), L_FLASH, SCLEX_CPP},
|
||||
{TEXT("nsis"), TEXT("NSIS"), TEXT("Nullsoft Scriptable Install System script file"), L_NSIS, SCLEX_NSIS},
|
||||
@ -138,6 +138,7 @@ LanguageName ScintillaEditView::langNames[L_EXTERNAL+1] = {
|
||||
{TEXT("coffeescript"), TEXT("CoffeeScript"), TEXT("CoffeeScript file"), L_COFFEESCRIPT, SCLEX_COFFEESCRIPT},
|
||||
{TEXT("json"), TEXT("json"), TEXT("JSON file"), L_JSON, SCLEX_CPP },
|
||||
{TEXT("javascript.js"), TEXT("JavaScript"), TEXT("JavaScript file"), L_JAVASCRIPT, SCLEX_CPP },
|
||||
{TEXT("fortran77"), TEXT("Fortran fixed form"), TEXT("Fortran fixed form source file"), L_FORTRAN_77, SCLEX_F77},
|
||||
{TEXT("ext"), TEXT("External"), TEXT("External"), L_EXTERNAL, SCLEX_NULL}
|
||||
};
|
||||
|
||||
@ -1410,6 +1411,9 @@ void ScintillaEditView::defineDocType(LangType typeDoc)
|
||||
case L_FORTRAN :
|
||||
setFortranLexer(); break;
|
||||
|
||||
case L_FORTRAN_77 :
|
||||
setFortran77Lexer(); break;
|
||||
|
||||
case L_LISP :
|
||||
setLispLexer(); break;
|
||||
|
||||
|
@ -764,7 +764,11 @@ protected:
|
||||
};
|
||||
|
||||
void setFortranLexer() {
|
||||
setLexer(SCLEX_F77, L_FORTRAN, LIST_0 | LIST_1 | LIST_2);
|
||||
setLexer(SCLEX_FORTRAN, L_FORTRAN, LIST_0 | LIST_1 | LIST_2);
|
||||
};
|
||||
|
||||
void setFortran77Lexer() {
|
||||
setLexer(SCLEX_F77, L_FORTRAN_77, LIST_0 | LIST_1 | LIST_2);
|
||||
};
|
||||
|
||||
void setLispLexer(){
|
||||
|
@ -78,8 +78,13 @@
|
||||
</Language>
|
||||
<Language name="diff" ext="diff patch">
|
||||
</Language>
|
||||
<Language name="fortran" ext="f for f90 f95 f2k" commentLine="C">
|
||||
<Keywords name="instre1">access action advance allocatable allocate apostrophe assign assignment associate asynchronous backspace bind blank blockdata call case character class close common complex contains continue cycle data deallocate decimal delim default dimension direct do dowhile double doubleprecision else elseif elsewhere encoding end endassociate endblockdata enddo endfile endforall endfunction endif endinterface endmodule endprogram endselect endsubroutine endtype endwhere entry eor equivalence err errmsg exist exit external file flush fmt forall form format formatted function go goto id if implicit in include inout integer inquire intent interface intrinsic iomsg iolength iostat kind len logical module name named namelist nextrec nml none nullify number only open opened operator optional out pad parameter pass pause pending pointer pos position precision print private program protected public quote read readwrite real rec recl recursive result return rewind save select selectcase selecttype sequential sign size stat status stop stream subroutine target then to type unformatted unit use value volatile wait where while write</Keywords>
|
||||
<Language name="fortran" ext="f for f90 f95 f2k f23" commentLine="!">
|
||||
<Keywords name="instre1">access action advance allocatable allocate apostrophe assign assignment associate asynchronous backspace bind blank blockdata call case character class close common complex contains continue critical cycle data deallocate decimal delim default dimension direct do dowhile double doubleprecision else elseif elsewhere encoding end endassociate endblockdata endcritical enddo endenum endfile endforall endfunction endif endinterface endmodule endprocedure endprogram endselect endsubmodule endsubroutine endtype endwhere entry enum eor equivalence err errmsg exist exit external file flush fmt forall form format formatted function go goto id if implicit in include inout integer inquire intent interface intrinsic iomsg iolength iostat kind len logical module name named namelist nextrec nml none nullify number only open opened operator optional out pad parameter pass pause pending pointer pos position precision print private procedure program protected public quote read readwrite real rec recl recursive result return rewind save select selectcase selecttype sequential sign size stat status stop stream submodule subroutine target then to type unformatted unit use value volatile wait where while write</Keywords>
|
||||
<Keywords name="instre2">abs achar acos acosd adjustl adjustr aimag aimax0 aimin0 aint ajmax0 ajmin0 akmax0 akmin0 all allocated alog alog10 amax0 amax1 amin0 amin1 amod anint any asin asind associated atan atan2 atan2d atand bitest bitl bitlr bitrl bjtest bit_size bktest break btest cabs ccos cdabs cdcos cdexp cdlog cdsin cdsqrt ceiling cexp char clog cmplx conjg cos cosd cosh count cpu_time cshift csin csqrt dabs dacos dacosd dasin dasind datan datan2 datan2d datand date date_and_time dble dcmplx dconjg dcos dcosd dcosh dcotan ddim dexp dfloat dflotk dfloti dflotj digits dim dimag dint dlog dlog10 dmax1 dmin1 dmod dnint dot_product dprod dreal dsign dsin dsind dsinh dsqrt dtan dtand dtanh eoshift epsilon errsns exp exponent float floati floatj floatk floor fraction free huge iabs iachar iand ibclr ibits ibset ichar idate idim idint idnint ieor ifix iiabs iiand iibclr iibits iibset iidim iidint iidnnt iieor iifix iint iior iiqint iiqnnt iishft iishftc iisign ilen imax0 imax1 imin0 imin1 imod index inint inot int int1 int2 int4 int8 iqint iqnint ior ishft ishftc isign isnan izext jiand jibclr jibits jibset jidim jidint jidnnt jieor jifix jint jior jiqint jiqnnt jishft jishftc jisign jmax0 jmax1 jmin0 jmin1 jmod jnint jnot jzext kiabs kiand kibclr kibits kibset kidim kidint kidnnt kieor kifix kind kint kior kishft kishftc kisign kmax0 kmax1 kmin0 kmin1 kmod knint knot kzext lbound leadz len len_trim lenlge lge lgt lle llt log log10 logical lshift malloc matmul max max0 max1 maxexponent maxloc maxval merge min min0 min1 minexponent minloc minval mod modulo mvbits nearest nint not nworkers number_of_processors pack popcnt poppar precision present product radix random random_number random_seed range real repeat reshape rrspacing rshift scale scan secnds selected_int_kind selected_real_kind set_exponent shape sign sin sind sinh size sizeof sngl snglq spacing spread sqrt sum system_clock tan tand tanh tiny transfer transpose trim ubound unpack verify</Keywords>
|
||||
<Keywords name="type1">cdabs cdcos cdexp cdlog cdsin cdsqrt cotan cotand dcmplx dconjg dcotan dcotand decode dimag dll_export dll_import doublecomplex dreal dvchk encode find flen flush getarg getcharqq getcl getdat getenv gettim hfix ibchng identifier imag int1 int2 int4 intc intrup invalop iostat_msg isha ishc ishl jfix lacfar locking locnear map nargs nbreak ndperr ndpexc offset ovefl peekcharqq precfill prompt qabs qacos qacosd qasin qasind qatan qatand qatan2 qcmplx qconjg qcos qcosd qcosh qdim qexp qext qextd qfloat qimag qlog qlog10 qmax1 qmin1 qmod qreal qsign qsin qsind qsinh qsqrt qtan qtand qtanh ran rand randu rewrite segment setdat settim system timer undfl unlock union val virtual volatile zabs zcos zexp zlog zsin zsqrt</Keywords>
|
||||
</Language>
|
||||
<Language name="fortran77" ext="f77" commentLine="C">
|
||||
<Keywords name="instre1">access action advance allocatable allocate apostrophe assign assignment associate asynchronous backspace bind blank blockdata call case character class close common complex contains continue critical cycle data deallocate decimal delim default dimension direct do dowhile double doubleprecision else elseif elsewhere encoding end endassociate endblockdata endcritical enddo endenum endfile endforall endfunction endif endinterface endmodule endprocedure endprogram endselect endsubmodule endsubroutine endtype endwhere entry enum eor equivalence err errmsg exist exit external file flush fmt forall form format formatted function go goto id if implicit in include inout integer inquire intent interface intrinsic iomsg iolength iostat kind len logical module name named namelist nextrec nml none nullify number only open opened operator optional out pad parameter pass pause pending pointer pos position precision print private procedure program protected public quote read readwrite real rec recl recursive result return rewind save select selectcase selecttype sequential sign size stat status stop stream submodule subroutine target then to type unformatted unit use value volatile wait where while write</Keywords>
|
||||
<Keywords name="instre2">abs achar acos acosd adjustl adjustr aimag aimax0 aimin0 aint ajmax0 ajmin0 akmax0 akmin0 all allocated alog alog10 amax0 amax1 amin0 amin1 amod anint any asin asind associated atan atan2 atan2d atand bitest bitl bitlr bitrl bjtest bit_size bktest break btest cabs ccos cdabs cdcos cdexp cdlog cdsin cdsqrt ceiling cexp char clog cmplx conjg cos cosd cosh count cpu_time cshift csin csqrt dabs dacos dacosd dasin dasind datan datan2 datan2d datand date date_and_time dble dcmplx dconjg dcos dcosd dcosh dcotan ddim dexp dfloat dflotk dfloti dflotj digits dim dimag dint dlog dlog10 dmax1 dmin1 dmod dnint dot_product dprod dreal dsign dsin dsind dsinh dsqrt dtan dtand dtanh eoshift epsilon errsns exp exponent float floati floatj floatk floor fraction free huge iabs iachar iand ibclr ibits ibset ichar idate idim idint idnint ieor ifix iiabs iiand iibclr iibits iibset iidim iidint iidnnt iieor iifix iint iior iiqint iiqnnt iishft iishftc iisign ilen imax0 imax1 imin0 imin1 imod index inint inot int int1 int2 int4 int8 iqint iqnint ior ishft ishftc isign isnan izext jiand jibclr jibits jibset jidim jidint jidnnt jieor jifix jint jior jiqint jiqnnt jishft jishftc jisign jmax0 jmax1 jmin0 jmin1 jmod jnint jnot jzext kiabs kiand kibclr kibits kibset kidim kidint kidnnt kieor kifix kind kint kior kishft kishftc kisign kmax0 kmax1 kmin0 kmin1 kmod knint knot kzext lbound leadz len len_trim lenlge lge lgt lle llt log log10 logical lshift malloc matmul max max0 max1 maxexponent maxloc maxval merge min min0 min1 minexponent minloc minval mod modulo mvbits nearest nint not nworkers number_of_processors pack popcnt poppar precision present product radix random random_number random_seed range real repeat reshape rrspacing rshift scale scan secnds selected_int_kind selected_real_kind set_exponent shape sign sin sind sinh size sizeof sngl snglq spacing spread sqrt sum system_clock tan tand tanh tiny transfer transpose trim ubound unpack verify</Keywords>
|
||||
<Keywords name="type1">cdabs cdcos cdexp cdlog cdsin cdsqrt cotan cotand dcmplx dconjg dcotan dcotand decode dimag dll_export dll_import doublecomplex dreal dvchk encode find flen flush getarg getcharqq getcl getdat getenv gettim hfix ibchng identifier imag int1 int2 int4 intc intrup invalop iostat_msg isha ishc ishl jfix lacfar locking locnear map nargs nbreak ndperr ndpexc offset ovefl peekcharqq precfill prompt qabs qacos qacosd qasin qasind qatan qatand qatan2 qcmplx qconjg qcos qcosd qcosh qdim qexp qext qextd qfloat qimag qlog qlog10 qmax1 qmin1 qmod qreal qsign qsin qsind qsinh qsqrt qtan qtand qtanh ran rand randu rewrite segment setdat settim system timer undfl unlock union val virtual volatile zabs zcos zexp zlog zsin zsqrt</Keywords>
|
||||
</Language>
|
||||
|
@ -466,6 +466,7 @@
|
||||
#define IDM_LANG_JSP (IDM_LANG + 55)
|
||||
#define IDM_LANG_COFFEESCRIPT (IDM_LANG + 56)
|
||||
#define IDM_LANG_JSON (IDM_LANG + 57)
|
||||
#define IDM_LANG_FORTRAN_77 (IDM_LANG + 58)
|
||||
|
||||
#define IDM_LANG_EXTERNAL (IDM_LANG + 65)
|
||||
#define IDM_LANG_EXTERNAL_LIMIT (IDM_LANG + 79)
|
||||
|
@ -299,7 +299,23 @@
|
||||
<LexerType name="nfo" desc="Dos Style" ext="">
|
||||
<WordsStyle name="DEFAULT" styleID="32" fgColor="2E2E2E" bgColor="FFFFFF" />
|
||||
</LexerType>
|
||||
<LexerType name="fortran" desc="Fortran" ext="">
|
||||
<LexerType name="fortran" desc="Fortran (free form)" ext="">
|
||||
<WordsStyle name="DEFAULT" styleID="0" fgColor="000000" bgColor="FFFFFF" fontName="" fontStyle="0" fontSize="" />
|
||||
<WordsStyle name="COMMENT" styleID="1" fgColor="008000" bgColor="FFFFFF" fontName="" fontStyle="0" fontSize="" />
|
||||
<WordsStyle name="NUMBER" styleID="2" fgColor="FF8000" bgColor="FFFFFF" fontName="" fontStyle="0" fontSize="" />
|
||||
<WordsStyle name="STRING" styleID="3" fgColor="808080" bgColor="FFFFFF" fontName="" fontStyle="0" fontSize="" />
|
||||
<WordsStyle name="STRING2" styleID="4" fgColor="808080" bgColor="FFFFFF" fontName="" fontStyle="1" fontSize="" />
|
||||
<WordsStyle name="OPERATOR" styleID="6" fgColor="000080" bgColor="FFFFFF" fontName="" fontStyle="1" fontSize="" />
|
||||
<WordsStyle name="IDENTIFIER" styleID="7" fgColor="000000" bgColor="FFFFFF" fontName="" fontStyle="0" fontSize="" />
|
||||
<WordsStyle name="INSTRUCTION WORD" styleID="8" fgColor="0000FF" bgColor="FFFFFF" fontName="" fontStyle="1" fontSize="" keywordClass="instre1" />
|
||||
<WordsStyle name="FUNCTION1" styleID="9" fgColor="8000FF" bgColor="FFFFFF" fontName="" fontStyle="1" fontSize="" keywordClass="instre2" />
|
||||
<WordsStyle name="FUNCTION2" styleID="10" fgColor="0080C0" bgColor="FFFFFF" fontName="" fontStyle="1" fontSize="" keywordClass="type1" />
|
||||
<WordsStyle name="PREPROCESSOR" styleID="11" fgColor="800000" bgColor="FFFFFF" fontName="" fontStyle="0" fontSize="" />
|
||||
<WordsStyle name="OPERATOR2" styleID="12" fgColor="808080" bgColor="FFFFFF" fontName="" fontStyle="0" fontSize="" />
|
||||
<WordsStyle name="LABEL" styleID="13" fgColor="FFFFFF" bgColor="FF80FF" fontName="" fontStyle="1" fontSize="" />
|
||||
<WordsStyle name="CONTINUATION" styleID="14" fgColor="008000" bgColor="FFFFFF" fontName="" fontStyle="0" fontSize="" />
|
||||
</LexerType>
|
||||
<LexerType name="fortran77" desc="Fortran (fixed form)" ext="">
|
||||
<WordsStyle name="DEFAULT" styleID="0" fgColor="000000" bgColor="FFFFFF" fontName="" fontStyle="0" fontSize="" />
|
||||
<WordsStyle name="COMMENT" styleID="1" fgColor="008000" bgColor="FFFFFF" fontName="" fontStyle="0" fontSize="" />
|
||||
<WordsStyle name="NUMBER" styleID="2" fgColor="FF8000" bgColor="FFFFFF" fontName="" fontStyle="0" fontSize="" />
|
||||
|
Loading…
Reference in New Issue
Block a user