mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-09-15 11:09:16 +02:00
parent
a3f756013d
commit
134b5553c3
@ -2105,17 +2105,16 @@ function TRegExpr.ParseAtom (var flagp : integer) : PRegExprChar;
|
|||||||
end;
|
end;
|
||||||
|
|
||||||
function HexDig (ch : REChar) : PtrInt;
|
function HexDig (ch : REChar) : PtrInt;
|
||||||
|
|
||||||
begin
|
begin
|
||||||
Result := 0;
|
Result := Ord(Ch);
|
||||||
if (ch >= 'a') and (ch <= 'f')
|
Case Result of
|
||||||
then ch := REChar (ord (ch) - (ord ('a') - ord ('A')));
|
Ord('A')..Ord('F') : Result:=10+Result-Ord('A');
|
||||||
if (ch < '0') or (ch > 'F') or ((ch > '9') and (ch < 'A')) then begin
|
Ord('a')..Ord('f') : Result:=10+Result-Ord('a');
|
||||||
|
Ord('0')..Ord('9') : Result:=Result-Ord('0');
|
||||||
|
else
|
||||||
Error (reeBadHexDigit);
|
Error (reeBadHexDigit);
|
||||||
EXIT;
|
end;
|
||||||
end;
|
|
||||||
Result := ord (ch) - ord ('0');
|
|
||||||
if ch >= 'A'
|
|
||||||
then Result := Result - (ord ('A') - ord ('9') - 1);
|
|
||||||
end;
|
end;
|
||||||
|
|
||||||
function EmitRange (AOpCode : REChar) : PRegExprChar;
|
function EmitRange (AOpCode : REChar) : PRegExprChar;
|
||||||
|
Loading…
Reference in New Issue
Block a user