mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-09-01 14:20:41 +02:00
LazUtils: Masks: TMask.Compile: do not call CompileRange when mocAnyCharOrNone is enabled, but mocRange and mocSet are disabled,
in taht case '[a' is a valid mask (of 2 literals).
This commit is contained in:
parent
a9c7e4196b
commit
3d0b1cc901
@ -951,8 +951,14 @@ begin
|
||||
end;
|
||||
'[':
|
||||
begin
|
||||
if [mocSet,mocRange,
|
||||
mocAnyCharOrNone] * fMaskOpcodesAllowed <> []
|
||||
if ([mocSet,mocRange,
|
||||
mocAnyCharOrNone] * fMaskOpcodesAllowed <> [])
|
||||
and not
|
||||
(
|
||||
([mocSet,mocRange]*fMaskOpCodesAllowed = []) //only mocAnyCharOrNone enabled
|
||||
and
|
||||
(fMaskInd<=fMaskLimit) and (fMask[fMaskInd+1]<>'?')// next char is not '?', so basically then the '[' is a literal (or an escapechar)
|
||||
)
|
||||
then
|
||||
CompileRange
|
||||
else begin
|
||||
|
Loading…
Reference in New Issue
Block a user