Skip to content

Commit

Permalink
cleanup
Browse files Browse the repository at this point in the history
  • Loading branch information
Alexey-T committed Mar 29, 2023
1 parent 741d363 commit 09f4a6f
Showing 1 changed file with 9 additions and 23 deletions.
32 changes: 9 additions & 23 deletions econtrol/ec_syntanal.pas
Original file line number Diff line number Diff line change
Expand Up @@ -1394,7 +1394,7 @@ function TecSingleTagCondition.CheckToken(const Source: ecString; const Token: P
UpdateRegexes;
SToken := Token.GetStr(Source, True); // Alexey

//try
//it was try/except around this block - bad! Alexey
for i := 0 to FTagList.Count - 1 do
begin
ReObj := TecRegExpr(FRegexes[i]);
Expand All @@ -1410,8 +1410,6 @@ function TecSingleTagCondition.CheckToken(const Source: ecString; const Token: P

if Result then break;
end;
//except
//end;
end else
begin
{$ifdef EC_CUSTOM_STR_FIND}
Expand Down Expand Up @@ -2094,16 +2092,12 @@ function TecTokenRule.GetItemBaseName: string;

function TecTokenRule.Match(const Source: ecString; Pos: integer): integer;
begin
//try
FCriSec.Enter; //solve CudaText issue #3352
try
Result := FRegExpr.MatchLength(Source, Pos);
finally
FCriSec.Leave;
end;
//except
// Result := 0;
//end;
FCriSec.Enter; //solve CudaText issue #3352
try
Result := FRegExpr.MatchLength(Source, Pos);
finally
FCriSec.Leave;
end;
end;

procedure TecTokenRule.SetColumnFrom(const Value: integer);
Expand Down Expand Up @@ -5942,20 +5936,12 @@ function TecSubAnalyzerRule.GetStartExpression: ecString;

function TecSubAnalyzerRule.MatchStart(const Source: ecString; Pos: integer): integer;
begin
//try
Result := FStartRegExpr.MatchLength(Source, Pos);
//except
// Result := 0;
//end;
Result := FStartRegExpr.MatchLength(Source, Pos);
end;

function TecSubAnalyzerRule.MatchEnd(const Source: ecString; Pos: integer): integer;
begin
//try
Result := FEndRegExpr.MatchLength(Source, Pos);
//except
// Result := 0;
//end;
Result := FEndRegExpr.MatchLength(Source, Pos);
end;

procedure TecSubAnalyzerRule.SetEndExpression(const Value: ecString);
Expand Down

0 comments on commit 09f4a6f

Please sign in to comment.