mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-08-26 20:40:36 +02:00
codetools: fixed calculating binary operators, bug #17759
git-svn-id: trunk@30601 -
This commit is contained in:
parent
e39bb2d05b
commit
0f7d9b552c
@ -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,10 +7645,14 @@ 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(
|
||||
FirstTargetParameterNode: TCodeTreeNode;
|
||||
|
Loading…
Reference in New Issue
Block a user