mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-08-25 18:40:33 +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 ShowTriedIdentifiers}
|
||||
{ $DEFINE ShowTriedUnits}
|
||||
{ $DEFINE ShowExprEval}
|
||||
{$DEFINE ShowExprEval}
|
||||
{ $DEFINE ShowFoundIdentifier}
|
||||
{ $DEFINE ShowInterfaceCache}
|
||||
{ $DEFINE ShowNodeCache}
|
||||
@ -7586,7 +7586,7 @@ begin
|
||||
|
||||
// ToDo: search for an overloaded operator
|
||||
|
||||
if WordIsBooleanOperator.DoItUpperCase(Src,BinaryOperator.StartPos,
|
||||
if WordIsBooleanOperator.DoItCaseInsensitive(Src,BinaryOperator.StartPos,
|
||||
BinaryOperator.EndPos-BinaryOperator.StartPos)
|
||||
then begin
|
||||
// Boolean operators
|
||||
@ -7598,14 +7598,14 @@ begin
|
||||
// real division /
|
||||
Result.Desc:=xtConstReal;
|
||||
end
|
||||
else if WordIsOrdNumberOperator.DoItUpperCase(Src,BinaryOperator.StartPos,
|
||||
else if WordIsOrdNumberOperator.DoItCaseInsensitive(Src,BinaryOperator.StartPos,
|
||||
BinaryOperator.EndPos-BinaryOperator.StartPos)
|
||||
then begin
|
||||
// ordinal number operator
|
||||
// or xor and mod div shl shr
|
||||
Result.Desc:=xtConstOrdInteger;
|
||||
end
|
||||
else if WordIsNumberOperator.DoItUpperCase(Src,BinaryOperator.StartPos,
|
||||
else if WordIsNumberOperator.DoItCaseInsensitive(Src,BinaryOperator.StartPos,
|
||||
BinaryOperator.EndPos-BinaryOperator.StartPos)
|
||||
then begin
|
||||
// number operator (or string concatenating or set cut)
|
||||
@ -7645,9 +7645,13 @@ begin
|
||||
else
|
||||
Result.Desc:=xtConstOrdInteger;
|
||||
end;
|
||||
end else
|
||||
end else begin
|
||||
// ???
|
||||
{$IFDEF ShowExprEval}
|
||||
debugln(['TFindDeclarationTool.CalculateBinaryOperator unknown operator: ',GetAtom(BinaryOperator)]);
|
||||
{$ENDIF}
|
||||
Result:=RightOperand;
|
||||
end;
|
||||
end;
|
||||
|
||||
function TFindDeclarationTool.IsParamExprListCompatibleToNodeList(
|
||||
|
Loading…
Reference in New Issue
Block a user