HL : End of the parsing Error corection

This commit is contained in:
Edouard Dupin 2011-08-09 17:07:03 +02:00
parent 7562c45aa7
commit 54cc9da39f
4 changed files with 11 additions and 7 deletions

View File

@ -40,7 +40,7 @@ void EdnBuf::SetHLSystem(Highlight * newHLSystem)
} }
} }
// TODO : Check this fuction it have too many conditionnal inside ==> can do a better algo
void EdnBuf::RegenerateHighLightAt(int32_t pos, int32_t nbDeleted, int32_t nbAdded) void EdnBuf::RegenerateHighLightAt(int32_t pos, int32_t nbDeleted, int32_t nbAdded)
{ {
GTimeVal timeStart; GTimeVal timeStart;
@ -98,8 +98,12 @@ void EdnBuf::RegenerateHighLightAt(int32_t pos, int32_t nbDeleted, int32_t nbAdd
m_HLDataPass1.Erase(startId+1, m_HLDataPass1.Size() - startId); m_HLDataPass1.Erase(startId+1, m_HLDataPass1.Size() - startId);
stopId = -1; stopId = -1;
} else { } else {
//EDN_DEBUG("4 * Erase " << startId+1 << "->" << stopId); int32_t currentSize = m_HLDataPass1.Size();
//EDN_DEBUG("4 * Erase " << startId+1 << "->" << stopId << " in " << currentSize << " elements" );
m_HLDataPass1.Erase(startId+1, stopId - startId); m_HLDataPass1.Erase(startId+1, stopId - startId);
if (stopId == currentSize-1) {
stopId = -1;
}
} }
//EDN_DEBUG("new size=" << (int32_t)m_HLDataPass1.Size()-1); //EDN_DEBUG("new size=" << (int32_t)m_HLDataPass1.Size()-1);
/* /*
@ -143,7 +147,6 @@ void EdnBuf::RegenerateHighLightAt(int32_t pos, int32_t nbDeleted, int32_t nbAdd
} }
} else { } else {
// Parse the new element ... // Parse the new element ...
//GenerateHighLightAt(pos, nbAdded);
GenerateHighLightAt(0, m_data.Size()); GenerateHighLightAt(0, m_data.Size());
} }
/* /*

View File

@ -15,7 +15,8 @@
- Project manager phase 1 - Project manager phase 1
# action a faire (ordonner) : # action a faire (ordonner) :
- HL : encore un problème sur le dernier parsing.... - SEARCH : get selected text in the search windows
- SEARCH : Select the search windows when call crtl+F
- ctags : Back simple et multiple - ctags : Back simple et multiple
- ctags : Multiple files - ctags : Multiple files
- sys : search complet, replace complet and replace ALL ... - sys : search complet, replace complet and replace ALL ...

View File

@ -111,7 +111,7 @@
</rule> </rule>
<rule name="condition"> <rule name="condition">
<color>boolean</color> <color>boolean</color>
<start>==|&lt;=|&gt;=|!=|&lt;|&gt;|&amp;&amp;|\{|\}|</start> <start>==|&lt;=|&gt;=|!=|&lt;{1,2}|&gt;{1,2}|&amp;&amp;|\{|\}|</start>
</rule> </rule>
<!-- With all elementes : <!-- With all elementes :
<rule name="BIG LETTER"> <rule name="BIG LETTER">

View File

@ -16,7 +16,7 @@
<rule name="simpleQuteText"> <rule name="simpleQuteText">
<color>doubleQuoteText</color> <color>doubleQuoteText</color>
<start>\@'</start> <start>\@'</start>
<end>'</end> <end>('|\n)</end>
<!--<EscapeChar>\</EscapeChar>--> <!--<EscapeChar>\</EscapeChar>-->
</rule> </rule>
</pass1> </pass1>
@ -26,7 +26,7 @@
<start>&lt;\?\w*|\?&gt;</start> <start>&lt;\?\w*|\?&gt;</start>
</rule> </rule>
<rule name="normale Balise"> <rule name="normale Balise">
<color>boolean</color> <color>functionName</color>
<start>&lt;/\w*|&lt;\w*|/&gt;|&gt;</start> <start>&lt;/\w*|&lt;\w*|/&gt;|&gt;</start>
</rule> </rule>
</pass2> </pass2>