[DEBUG] correct C regExp
This commit is contained in:
@@ -177,7 +177,7 @@ void appl::Highlight::parse(int64_t _start,
|
||||
//try to fond the HL in ALL of we have
|
||||
for (int64_t jjj=0; jjj<(int64_t)m_listHighlightPass1.size(); jjj++){
|
||||
enum resultFind ret = HLP_FIND_OK;
|
||||
HL_DEBUG("Parse HL id=" << jjj << " position search: (" << elementStart << "," << _stop << ")" );
|
||||
HL_DEBUG("Parse HL id=" << jjj << " position search: (" << elementStart << "," << _stop << ") input start='" << _buffer[elementStart] << "' " << m_listHighlightPass1[jjj]->getPaternString());
|
||||
// Stop the search to the end (to get the end of the pattern)
|
||||
ret = m_listHighlightPass1[jjj]->find(elementStart, _buffer.size(), resultat, _buffer);
|
||||
if (HLP_FIND_ERROR != ret) {
|
||||
@@ -234,15 +234,19 @@ void appl::Highlight::parse2(int64_t _start,
|
||||
appl::HighlightInfo resultat;
|
||||
|
||||
while (elementStart < elementStop) {
|
||||
if (elementStart == 306) {
|
||||
//etk::log::setLevel(etk::log::logLevelVerbose);
|
||||
}
|
||||
//HL2_DEBUG("Parse element in the buffer pos=" << elementStart << "," << _buffer.size() << ")" );
|
||||
//try to fond the HL in ALL of we have
|
||||
for (int64_t jjj=0; jjj<(int64_t)m_listHighlightPass2.size(); jjj++){
|
||||
enum resultFind ret = HLP_FIND_OK;
|
||||
HL2_DEBUG("Parse HL id=" << jjj << " position search: (" <<
|
||||
_start << "," << _buffer.size() << ")" );
|
||||
elementStart << "," << elementStop << ") in='"
|
||||
<< _buffer[elementStart] << "' " << m_listHighlightPass2[jjj]->getPaternString());
|
||||
// Stop the search to the end (to get the end of the pattern)
|
||||
ret = m_listHighlightPass2[jjj]->find(elementStart, elementStop, resultat, _buffer);
|
||||
if (HLP_FIND_ERROR != ret) {
|
||||
if (ret != HLP_FIND_ERROR) {
|
||||
HL2_DEBUG("Find Pattern in the Buffer : (" << resultat.start << "," << resultat.stop << ")" );
|
||||
// add curent element in the list ...
|
||||
_metaData.push_back(resultat);
|
||||
|
@@ -32,6 +32,9 @@ void appl::HighlightPattern::setPatern(std::string& _regExp) {
|
||||
}
|
||||
m_regExp->compile(_regExp);
|
||||
}
|
||||
std::string appl::HighlightPattern::getPaternString() {
|
||||
return m_regExp->getRegExDecorated();
|
||||
}
|
||||
|
||||
void appl::HighlightPattern::setColorGlyph(std::string& _colorName) {
|
||||
m_colorName = _colorName;
|
||||
|
@@ -47,6 +47,7 @@ namespace appl {
|
||||
std::unique_ptr<etk::RegExp<etk::Buffer>> m_regExp; //!< Start of Regular expression
|
||||
public:
|
||||
void setPatern(std::string& _regExp);
|
||||
std::string getPaternString();
|
||||
private:
|
||||
std::string m_colorName; //!< Current color name
|
||||
int32_t m_colorId; //!< Id of the the glyph painting
|
||||
|
Reference in New Issue
Block a user