From 54cc9da39f2ad0ade29656ab3b5e52a063d9fe54 Mon Sep 17 00:00:00 2001 From: Edouard Dupin Date: Tue, 9 Aug 2011 17:07:03 +0200 Subject: [PATCH] HL : End of the parsing Error corection --- Sources/tools/EdnBuf/EdnBuf_HighLight.cpp | 9 ++++++--- avancement.boo | 3 ++- data/lang_c.xml | 2 +- data/lang_xml.xml | 4 ++-- 4 files changed, 11 insertions(+), 7 deletions(-) diff --git a/Sources/tools/EdnBuf/EdnBuf_HighLight.cpp b/Sources/tools/EdnBuf/EdnBuf_HighLight.cpp index b814a15..4758e99 100644 --- a/Sources/tools/EdnBuf/EdnBuf_HighLight.cpp +++ b/Sources/tools/EdnBuf/EdnBuf_HighLight.cpp @@ -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) { 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); stopId = -1; } 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); + if (stopId == currentSize-1) { + stopId = -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 { // Parse the new element ... - //GenerateHighLightAt(pos, nbAdded); GenerateHighLightAt(0, m_data.Size()); } /* diff --git a/avancement.boo b/avancement.boo index da4854f..93bf7d1 100644 --- a/avancement.boo +++ b/avancement.boo @@ -15,7 +15,8 @@ - Project manager phase 1 # 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 : Multiple files - sys : search complet, replace complet and replace ALL ... diff --git a/data/lang_c.xml b/data/lang_c.xml index f7652e0..4ff2593 100644 --- a/data/lang_c.xml +++ b/data/lang_c.xml @@ -111,7 +111,7 @@ boolean - ==|<=|>=|!=|<|>|&&|\{|\}| + ==|<=|>=|!=|<{1,2}|>{1,2}|&&|\{|\}| @@ -26,7 +26,7 @@ <\?\w*|\?> - boolean + functionName </\w*|<\w*|/>|>