mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-08-18 15:19:19 +02:00
LazUtils: Masks: CompileRange: comment out debug a piece of code that is (if I am correct) dead (see the comments).
Note: code still contains writeln's, so it will crash if no console is available.
This commit is contained in:
parent
355912f3cd
commit
7a4464df4e
@ -938,12 +938,19 @@ begin
|
|||||||
(
|
(
|
||||||
([mocSet,mocRange]*fMaskOpCodesAllowed = []) //only mocAnyCharOrNone enabled
|
([mocSet,mocRange]*fMaskOpCodesAllowed = []) //only mocAnyCharOrNone enabled
|
||||||
and
|
and
|
||||||
(fMaskInd<fMaskLimit) and (fMask[fMaskInd+1]<>'?')// next char is not '?', so basically then the '[' is a literal (or an escapechar)
|
(fMaskInd<fMaskLimit) and (fMask[fMaskInd+1]<>'?')// next char is not '?', so basically then the '[' is a literal
|
||||||
)
|
)
|
||||||
then
|
then
|
||||||
CompileRange
|
CompileRange
|
||||||
else begin
|
else begin //either mocSet,MocRange and mocAnyCharOrNone are all disabled, or only mocAnyCharOrNone is enabled and the '[' is not followed by a '?'
|
||||||
|
{
|
||||||
if (fMask[fMaskInd]=FMaskEscapeChar) and (mocEscapeChar in FMaskOpcodesAllowed) then begin //DEAD CODE?
|
if (fMask[fMaskInd]=FMaskEscapeChar) and (mocEscapeChar in FMaskOpcodesAllowed) then begin //DEAD CODE?
|
||||||
|
//This codepath could only be chosen if, at this point '[' is the escapechar
|
||||||
|
//but, if that is the case, it should already have been handled in Compile
|
||||||
|
//and CompileRange should not have been called.
|
||||||
|
//Maybe I'm wrong, so I just comment this section out instead of
|
||||||
|
//completely removing it
|
||||||
|
|
||||||
// next is Literal
|
// next is Literal
|
||||||
inc(fMaskInd,fCPLength);
|
inc(fMaskInd,fCPLength);
|
||||||
if fMaskInd<=fMaskLimit then begin
|
if fMaskInd<=fMaskLimit then begin
|
||||||
@ -952,6 +959,7 @@ begin
|
|||||||
Exception_IncompleteMask();
|
Exception_IncompleteMask();
|
||||||
end;
|
end;
|
||||||
end; //DEAD CODE??
|
end; //DEAD CODE??
|
||||||
|
}
|
||||||
AddLiteral;
|
AddLiteral;
|
||||||
end;
|
end;
|
||||||
end;
|
end;
|
||||||
|
Loading…
Reference in New Issue
Block a user