|
@@ -21,12 +21,12 @@ ColorParser::ColorParser( Text *zTxt )
|
|
|
// Destructor
|
|
|
ColorParser::~ColorParser()
|
|
|
{
|
|
|
- for( auto i = abschnitt.getArray(); i.set; i++ )
|
|
|
+ for( auto i = abschnitt.getIterator(); i; i++ )
|
|
|
{
|
|
|
- if( i.var.zFunktion )
|
|
|
- i.var.zFunktion->release();
|
|
|
- if( i.var.zKlasse )
|
|
|
- i.var.zKlasse->release();
|
|
|
+ if( i._.zFunktion )
|
|
|
+ i._.zFunktion->release();
|
|
|
+ if( i._.zKlasse )
|
|
|
+ i._.zKlasse->release();
|
|
|
}
|
|
|
txt->release();
|
|
|
}
|
|
@@ -73,12 +73,12 @@ void ColorParser::reload()
|
|
|
error.leeren();
|
|
|
string.leeren();
|
|
|
kommentar.leeren();
|
|
|
- for( auto i = abschnitt.getArray(); i.set; i++ )
|
|
|
+ for( auto i = abschnitt.getIterator(); i; i++ )
|
|
|
{
|
|
|
- if( i.var.zFunktion )
|
|
|
- i.var.zFunktion->release();
|
|
|
- if( i.var.zKlasse )
|
|
|
- i.var.zKlasse->release();
|
|
|
+ if( i._.zFunktion )
|
|
|
+ i._.zFunktion->release();
|
|
|
+ if( i._.zKlasse )
|
|
|
+ i._.zKlasse->release();
|
|
|
}
|
|
|
abschnitt.leeren();
|
|
|
delete dat;
|
|
@@ -250,14 +250,14 @@ KSGScriptEditor::ColorType ColorParser::getNextColor( int p, int &underlineC )
|
|
|
}
|
|
|
bool inString = 0;
|
|
|
bool inKommentar = 0;
|
|
|
- for( auto i = string.getArray(); i.set; i++ )
|
|
|
+ for( auto i = string.getIterator(); i; i++ )
|
|
|
{
|
|
|
- if( i.var.anfang <= p && i.var.ende >= p )
|
|
|
+ if( i._.anfang <= p && i._.ende >= p )
|
|
|
inString = 1;
|
|
|
}
|
|
|
- for( auto i = kommentar.getArray(); i.set; i++ )
|
|
|
+ for( auto i = kommentar.getIterator(); i; i++ )
|
|
|
{
|
|
|
- if( i.var.anfang <= p && i.var.ende >= p )
|
|
|
+ if( i._.anfang <= p && i._.ende >= p )
|
|
|
inKommentar = 1;
|
|
|
}
|
|
|
if( !inString && !inKommentar )
|
|
@@ -304,19 +304,19 @@ KSGScriptEditor::ColorType ColorParser::getNextColor( int p, int &underlineC )
|
|
|
}
|
|
|
if( !pos.inInstanzVar && !pos.inParameter && !pos.inKeyword && !pos.inTypename && istLehr( cm1 ) )
|
|
|
{
|
|
|
- for( auto i = abschnitt.getArray(); i.set; i++ )
|
|
|
+ for( auto i = abschnitt.getIterator(); i; i++ )
|
|
|
{
|
|
|
- if( i.var.anfang <= p && i.var.ende >= p )
|
|
|
+ if( i._.anfang <= p && i._.ende >= p )
|
|
|
{
|
|
|
- if( i.var.zFunktion )
|
|
|
+ if( i._.zFunktion )
|
|
|
{
|
|
|
- int anz = i.var.zFunktion->parameter.getEintragAnzahl();
|
|
|
+ int anz = i._.zFunktion->parameter.getEintragAnzahl();
|
|
|
for( int j = 0; j < anz; j++ )
|
|
|
{
|
|
|
- int nl = i.var.zFunktion->parameter.get( j )->name.getLength();
|
|
|
+ int nl = i._.zFunktion->parameter.get( j )->name.getLength();
|
|
|
pos.inParameter = 1;
|
|
|
for( int k = 0; k < nl && k + p < scriptL && pos.inParameter; k++ )
|
|
|
- pos.inParameter &= txt->getText()[ k + p ] == i.var.zFunktion->parameter.get( j )->name.getText()[ k ];
|
|
|
+ pos.inParameter &= txt->getText()[ k + p ] == i._.zFunktion->parameter.get( j )->name.getText()[ k ];
|
|
|
if( pos.inParameter && ( nl + p == scriptL || istTrenner( txt->getText()[ nl + p ] ) ) )
|
|
|
break;
|
|
|
pos.inParameter = 0;
|
|
@@ -327,19 +327,19 @@ KSGScriptEditor::ColorType ColorParser::getNextColor( int p, int &underlineC )
|
|
|
}
|
|
|
if( !pos.inInstanzVar && !pos.inParameter && !pos.inKeyword && !pos.inTypename && istLehr( cm1 ) )
|
|
|
{
|
|
|
- for( auto i = abschnitt.getArray(); i.set; i++ )
|
|
|
+ for( auto i = abschnitt.getIterator(); i; i++ )
|
|
|
{
|
|
|
- if( i.var.anfang <= p && i.var.ende >= p )
|
|
|
+ if( i._.anfang <= p && i._.ende >= p )
|
|
|
{
|
|
|
- if( i.var.zKlasse )
|
|
|
+ if( i._.zKlasse )
|
|
|
{
|
|
|
- int anz = i.var.zKlasse->variablen.getEintragAnzahl();
|
|
|
+ int anz = i._.zKlasse->variablen.getEintragAnzahl();
|
|
|
for( int j = 0; j < anz; j++ )
|
|
|
{
|
|
|
- int nl = i.var.zKlasse->variablen.get( j )->name.getLength();
|
|
|
+ int nl = i._.zKlasse->variablen.get( j )->name.getLength();
|
|
|
pos.inInstanzVar = 1;
|
|
|
for( int k = 0; k < nl && k + p < scriptL && pos.inInstanzVar; k++ )
|
|
|
- pos.inInstanzVar &= txt->getText()[ k + p ] == i.var.zKlasse->variablen.get( j )->name.getText()[ k ];
|
|
|
+ pos.inInstanzVar &= txt->getText()[ k + p ] == i._.zKlasse->variablen.get( j )->name.getText()[ k ];
|
|
|
if( pos.inInstanzVar && ( nl + p == scriptL || istTrenner( txt->getText()[ nl + p ] ) ) )
|
|
|
break;
|
|
|
pos.inInstanzVar = 0;
|
|
@@ -361,9 +361,9 @@ KSGScriptEditor::ColorType ColorParser::getNextColor( int p, int &underlineC )
|
|
|
color = KSGScriptEditor::ColorType::STRING;
|
|
|
if( inKommentar )
|
|
|
color = KSGScriptEditor::ColorType::KOMMENTAR;
|
|
|
- for( auto i = error.getArray(); i.set; i++ )
|
|
|
+ for( auto i = error.getIterator(); i; i++ )
|
|
|
{
|
|
|
- if( i.var.anfang <= p && i.var.ende >= p )
|
|
|
+ if( i._.anfang <= p && i._.ende >= p )
|
|
|
underlineC = KSGScriptEditor::ColorType::ERROR_UNDERLINE;
|
|
|
}
|
|
|
return color;
|