mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-08-17 21:59:16 +02:00
codetools: expreval: and, or short eval set 0,1
git-svn-id: trunk@22799 -
This commit is contained in:
parent
47931548ff
commit
4d7aa9e2ea
@ -1606,7 +1606,10 @@ begin
|
|||||||
'A':
|
'A':
|
||||||
if CompareIdentifiers(AtomStart,'AND')=0 then begin
|
if CompareIdentifiers(AtomStart,'AND')=0 then begin
|
||||||
OperatorLvl:=1;
|
OperatorLvl:=1;
|
||||||
if not OperandIsTrue(Operand) then break;
|
if not OperandIsTrue(Operand) then begin
|
||||||
|
SetOperandValueChar(Operand,'0');
|
||||||
|
break;
|
||||||
|
end;
|
||||||
end;
|
end;
|
||||||
'D': if CompareIdentifiers(AtomStart,'DIV')=0 then OperatorLvl:=1;
|
'D': if CompareIdentifiers(AtomStart,'DIV')=0 then OperatorLvl:=1;
|
||||||
'M': if CompareIdentifiers(AtomStart,'MOD')=0 then OperatorLvl:=1;
|
'M': if CompareIdentifiers(AtomStart,'MOD')=0 then OperatorLvl:=1;
|
||||||
@ -1623,7 +1626,10 @@ begin
|
|||||||
'R':
|
'R':
|
||||||
if p-AtomStart=2 then begin
|
if p-AtomStart=2 then begin
|
||||||
OperatorLvl:=2;
|
OperatorLvl:=2;
|
||||||
if OperandIsTrue(Operand) then break;
|
if OperandIsTrue(Operand) then begin
|
||||||
|
SetOperandValueChar(Operand,'1');
|
||||||
|
break;
|
||||||
|
end;
|
||||||
end;
|
end;
|
||||||
end;
|
end;
|
||||||
'X': if CompareIdentifiers(AtomStart,'XOR')=0 then OperatorLvl:=2;
|
'X': if CompareIdentifiers(AtomStart,'XOR')=0 then OperatorLvl:=2;
|
||||||
|
Loading…
Reference in New Issue
Block a user