instanton:
I attach a modified lexer code for metapost, with additional folding functionality. This has been tested for somewhile (with 1.73 and 1.74) and no problem is found so far. Just put it in the Scintilla source tree and rebuild.
OK, here are the warnings for the most recent LexTex and LexMetapost: ..\src\LexTeX.cxx: Warning W8057 ..\src\LexTeX.cxx 475: Parameter 'initStyle' is never used in function FoldTexDoc(unsigned int,int,int,WordList * *,Accessor &) Unused parameters should not be named: static void FoldTexDoc(unsigned int startPos, int length, int initStyle, WordList *[], Accessor &styler) becomes static void FoldTexDoc(unsigned int startPos, int length, int, WordList *[], Accessor &styler) ..\src\LexMetapost.cxx: Warning W8004 ..\src\LexMetapost.cxx 426: 'chNext6' is assigned a value that is never used in function FoldMetapostDoc(unsigned int,int,int,WordList * *,Accessor &) Warning W8004 ..\src\LexMetapost.cxx 426: 'chPrev' is assigned a value that is never used in function FoldMetapostDoc(unsigned int,int,int,WordList * *,Accessor &) Warning W8004 ..\src\LexMetapost.cxx 431: 'style' is assigned a value that is never used in function FoldMetapostDoc(unsigned int,int,int,WordList * *,Accessor &) After style is removed then initStyle should not be named, similar to LexTeX above. ParseMetapostWord should be static. You should really remove all dead code and variables once the code is working otherwise its just confusing for readers of the code and will produce warnings.
BTW: why MinGW doesn't give any warnings of this kind?
The gcc compiler has never had great diagnostics: it tends to be overly picky about things that don't matter but not provide the helpful information of Borland or Microsoft. Borland is particularly good at looking at dead code: you can often find that quite a bit can be removed. Neil _______________________________________________ Scintilla-interest mailing list [email protected] http://mailman.lyra.org/mailman/listinfo/scintilla-interest
