From: Dirk B. <db...@us...> - 2006-09-23 15:10:35
|
Update of /cvsroot/win32forth/win32forth-extsrc/extsrc/w32fScintilla/src In directory sc8-pr-cvs9.sourceforge.net:/tmp/cvs-serv3276/extsrc/w32fScintilla/src Modified Files: LexForth.cxx Log Message: - Fixed some bug's in the colorization support. gkernel.f now look's mutch better in the IDE. Index: LexForth.cxx =================================================================== RCS file: /cvsroot/win32forth/win32forth-extsrc/extsrc/w32fScintilla/src/LexForth.cxx,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** LexForth.cxx 23 Jan 2005 16:38:02 -0000 1.2 --- LexForth.cxx 23 Sep 2006 15:10:30 -0000 1.3 *************** *** 211,225 **** if( strcmp("\\S",buffer)==0 ) // comment till end of file { ! #ifndef _DEBUG ! styler.ColourTo(pos1, SCE_FORTH_COMMENT); ! styler.ColourTo(lengthDoc-1, SCE_FORTH_COMMENT); ! #endif ! break; // leave parser } else if( strcmp("\\",buffer)==0 || strcmp("//",buffer)==0 ) // comment till end of line { ! styler.ColourTo(pos1-1,SCE_FORTH_COMMENT); ! parse(1, false); ! styler.ColourTo(pos2,SCE_FORTH_COMMENT); } else if( strcmp("(",buffer)==0 || strcmp(".(",buffer)==0 ) // comment till ) --- 211,247 ---- if( strcmp("\\S",buffer)==0 ) // comment till end of file { ! char ch1 = styler.SafeGetCharAt(pos1-1); ! char ch2 = styler.SafeGetCharAt(pos1-2); ! char ch3 = styler.SafeGetCharAt(pos1-3); ! if( ch1 == ' ' && ch2 == ':' && is_eol(ch3) ) ! { ! styler.ColourTo(pos1, SCE_FORTH_DEFAULT); ! styler.ColourTo(pos2, SCE_FORTH_DEFAULT); ! cur_pos = pos2 + 1; ! } ! else ! { ! styler.ColourTo(pos1, SCE_FORTH_COMMENT); ! styler.ColourTo(lengthDoc-1, SCE_FORTH_COMMENT); ! break; // leave parser ! } } else if( strcmp("\\",buffer)==0 || strcmp("//",buffer)==0 ) // comment till end of line { ! char ch1 = styler.SafeGetCharAt(pos1-1); ! char ch2 = styler.SafeGetCharAt(pos1-2); ! char ch3 = styler.SafeGetCharAt(pos1-3); ! if( ch1 == ' ' && ch2 == ':' && is_eol(ch3) ) ! { ! styler.ColourTo(pos1, SCE_FORTH_ANS); ! styler.ColourTo(pos2, SCE_FORTH_ANS); ! cur_pos = pos2 + 1; ! } ! else ! { ! styler.ColourTo(pos1-1,SCE_FORTH_COMMENT); ! parse(1, false); ! styler.ColourTo(pos2,SCE_FORTH_COMMENT); ! } } else if( strcmp("(",buffer)==0 || strcmp(".(",buffer)==0 ) // comment till ) *************** *** 234,240 **** else if( strcmp("{",buffer)==0 ) // locals till } { ! styler.ColourTo(pos1,SCE_FORTH_LOCALS); ! parse('}', true); ! styler.ColourTo(pos2+1,SCE_FORTH_LOCALS); } else if( commentStart.InList(buffer) ) // multi line comments --- 256,274 ---- else if( strcmp("{",buffer)==0 ) // locals till } { ! char ch1 = styler.SafeGetCharAt(pos1-1); ! char ch2 = styler.SafeGetCharAt(pos1-2); ! char ch3 = styler.SafeGetCharAt(pos1-3); ! if( ch1 == ' ' && ch2 == ':' && is_eol(ch3) ) ! { ! styler.ColourTo(pos1, SCE_FORTH_DEFAULT); ! styler.ColourTo(pos2, SCE_FORTH_DEFAULT); ! cur_pos = pos2 + 1; ! } ! else ! { ! styler.ColourTo(pos1,SCE_FORTH_LOCALS); ! parse('}', true); ! styler.ColourTo(pos2+1,SCE_FORTH_LOCALS); ! } } else if( commentStart.InList(buffer) ) // multi line comments *************** *** 279,282 **** --- 313,317 ---- int iStart = pos1; + int iEnd = pos2; char ch1 = styler.SafeGetCharAt(pos1-1); *************** *** 302,308 **** { styler.ColourTo( iStart, SCE_FORTH_STRING ); ! styler.ColourTo( pos2+1, SCE_FORTH_STRING ); } } } //------------------------------------------------------------------------------------------- --- 337,350 ---- { styler.ColourTo( iStart, SCE_FORTH_STRING ); ! styler.ColourTo( iEnd, SCE_FORTH_STRING ); ! cur_pos = iEnd + 1; } } + else + { + if( parse(1, false) ) + styler.ColourTo( pos2 , SCE_FORTH_STRING ); + } + } //------------------------------------------------------------------------------------------- |