BUG in syntax highligthing
Stefan Heidrich
sheidric at rz.uni-potsdam.de
Sun Aug 8 15:29:36 BST 1999
Hi Roland,
i have commited your patch.
Thanks,
Stefan
On Wed, 04 Aug 1999, you wrote:
>The bug is caused by the patch for highlighting of C/C++ Symbols. If the
>list in highlight.cpp is changed, so that the C Symbols are checked after
>the preprocessor commands have been parsed then both work.
>
>Original Source
>
>void CHighlight::makeContextList() {
> HlContext *c;
> HlKeyword *keyword, *dataType;
> //normal context
> contextList[0] = c = new HlContext(0,0);
> c->items.append(new HlCSymbol(13,0));
> c->items.append(keyword = new HlKeyword(1,0));
> c->items.append(dataType = new HlKeyword(2,0));
> c->items.append(new HlCFloat(6,0));
> c->items.append(new HlCOct(4,0));
> c->items.append(new HlCHex(5,0));
> c->items.append(new HlCInt(3,0));
> c->items.append(new HlCChar(7,0));
> c->items.append(new HlCharDetect(8,1,'"'));
> c->items.append(new Hl2CharDetect(10,2,"//"));
> c->items.append(new Hl2CharDetect(10,3,"/*"));
> c->items.append(new HlCPrep(11,4));
>
>Changed Source
>
>void CHighlight::makeContextList() {
> HlContext *c;
> HlKeyword *keyword, *dataType;
> //normal context
> contextList[0] = c = new HlContext(0,0);
> c->items.append(keyword = new HlKeyword(1,0));
> c->items.append(dataType = new HlKeyword(2,0));
> c->items.append(new HlCFloat(6,0));
> c->items.append(new HlCOct(4,0));
> c->items.append(new HlCHex(5,0));
> c->items.append(new HlCInt(3,0));
> c->items.append(new HlCChar(7,0));
> c->items.append(new HlCharDetect(8,1,'"'));
> c->items.append(new Hl2CharDetect(10,2,"//"));
> c->items.append(new Hl2CharDetect(10,3,"/*"));
> c->items.append(new HlCPrep(11,4));
> c->items.append(new HlCSymbol(13,0));
>
>Maybe you can include it into one of your next distributions
>
>Roland Micko
>ICN CA MR EG 2
>
>SIEMENS AG
>Hofmannstr. 51
>81359 München
>
>Tel.: +4989/722-21632
>Fax.: +4989/722-47420
>email: roland.micko at icn.siemens.de
>
>> -----Ursprüngliche Nachricht-----
>> Von: Micko Roland
>> Gesendet am: Freitag, 30. Juli 1999 12:58
>> An: 'Kdevelop'
>> Betreff: BUG in syntax highligthing
>>
>> The preprocessor commands are not correctly highlighted, if the command
>> doesn't start at the beginning of the line.
>> Example
>>
>> :
>> :
>> #include <stdlib.h> <-- This works text is highlighted
>> :
>> #include <stdio.h> <-- This is displayed as normal text
>>
>> With the release from end of June it worked.
>>
>> Roland Micko
>> ICN CA MR EG 2
>>
>> SIEMENS AG
>> Hofmannstr. 51
>> 81359 München
>>
>> Tel.: +4989/722-21632
>> Fax.: +4989/722-47420
>> email: roland.micko at icn.siemens.de
>>
More information about the KDevelop
mailing list