mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-08-31 01:54:51 +02:00
codetools: fixed calculating binary operators, bug #17759
git-svn-id: trunk@30601 -
This commit is contained in:
parent
e39bb2d05b
commit
0f7d9b552c
@ -57,7 +57,7 @@ interface
|
|||||||
{ $DEFINE ShowTriedParentContexts}
|
{ $DEFINE ShowTriedParentContexts}
|
||||||
{ $DEFINE ShowTriedIdentifiers}
|
{ $DEFINE ShowTriedIdentifiers}
|
||||||
{ $DEFINE ShowTriedUnits}
|
{ $DEFINE ShowTriedUnits}
|
||||||
{ $DEFINE ShowExprEval}
|
{$DEFINE ShowExprEval}
|
||||||
{ $DEFINE ShowFoundIdentifier}
|
{ $DEFINE ShowFoundIdentifier}
|
||||||
{ $DEFINE ShowInterfaceCache}
|
{ $DEFINE ShowInterfaceCache}
|
||||||
{ $DEFINE ShowNodeCache}
|
{ $DEFINE ShowNodeCache}
|
||||||
@ -7586,7 +7586,7 @@ begin
|
|||||||
|
|
||||||
// ToDo: search for an overloaded operator
|
// ToDo: search for an overloaded operator
|
||||||
|
|
||||||
if WordIsBooleanOperator.DoItUpperCase(Src,BinaryOperator.StartPos,
|
if WordIsBooleanOperator.DoItCaseInsensitive(Src,BinaryOperator.StartPos,
|
||||||
BinaryOperator.EndPos-BinaryOperator.StartPos)
|
BinaryOperator.EndPos-BinaryOperator.StartPos)
|
||||||
then begin
|
then begin
|
||||||
// Boolean operators
|
// Boolean operators
|
||||||
@ -7598,14 +7598,14 @@ begin
|
|||||||
// real division /
|
// real division /
|
||||||
Result.Desc:=xtConstReal;
|
Result.Desc:=xtConstReal;
|
||||||
end
|
end
|
||||||
else if WordIsOrdNumberOperator.DoItUpperCase(Src,BinaryOperator.StartPos,
|
else if WordIsOrdNumberOperator.DoItCaseInsensitive(Src,BinaryOperator.StartPos,
|
||||||
BinaryOperator.EndPos-BinaryOperator.StartPos)
|
BinaryOperator.EndPos-BinaryOperator.StartPos)
|
||||||
then begin
|
then begin
|
||||||
// ordinal number operator
|
// ordinal number operator
|
||||||
// or xor and mod div shl shr
|
// or xor and mod div shl shr
|
||||||
Result.Desc:=xtConstOrdInteger;
|
Result.Desc:=xtConstOrdInteger;
|
||||||
end
|
end
|
||||||
else if WordIsNumberOperator.DoItUpperCase(Src,BinaryOperator.StartPos,
|
else if WordIsNumberOperator.DoItCaseInsensitive(Src,BinaryOperator.StartPos,
|
||||||
BinaryOperator.EndPos-BinaryOperator.StartPos)
|
BinaryOperator.EndPos-BinaryOperator.StartPos)
|
||||||
then begin
|
then begin
|
||||||
// number operator (or string concatenating or set cut)
|
// number operator (or string concatenating or set cut)
|
||||||
@ -7645,9 +7645,13 @@ begin
|
|||||||
else
|
else
|
||||||
Result.Desc:=xtConstOrdInteger;
|
Result.Desc:=xtConstOrdInteger;
|
||||||
end;
|
end;
|
||||||
end else
|
end else begin
|
||||||
// ???
|
// ???
|
||||||
|
{$IFDEF ShowExprEval}
|
||||||
|
debugln(['TFindDeclarationTool.CalculateBinaryOperator unknown operator: ',GetAtom(BinaryOperator)]);
|
||||||
|
{$ENDIF}
|
||||||
Result:=RightOperand;
|
Result:=RightOperand;
|
||||||
|
end;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
function TFindDeclarationTool.IsParamExprListCompatibleToNodeList(
|
function TFindDeclarationTool.IsParamExprListCompatibleToNodeList(
|
||||||
|
Loading…
Reference in New Issue
Block a user