mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-11-02 06:23:35 +01:00
codetools: find declaration: implemented if string is ansistring
git-svn-id: trunk@14167 -
This commit is contained in:
parent
697fc18008
commit
b961973398
@ -35,8 +35,8 @@ interface
|
||||
|
||||
{$I codetools.inc}
|
||||
|
||||
{ $DEFINE CTDEBUG}
|
||||
{ $DEFINE ShowAllProcs}
|
||||
{off $DEFINE CTDEBUG}
|
||||
{off $DEFINE ShowAllProcs}
|
||||
|
||||
uses
|
||||
{$IFDEF MEM_CHECK}
|
||||
@ -739,7 +739,7 @@ begin
|
||||
if (ClassNode=nil) or (ClassNode.Desc<>ctnClass) or (AMethodName='')
|
||||
or (ATypeInfo=nil) or (SourceChangeCache=nil) or (Scanner=nil) then exit;
|
||||
{$IFDEF CTDEBUG}
|
||||
DebugLn(['[TEventsCodeTool.CreateMethod] A AMethodName="',AMethodName,'" in "',MainFilename,'" UseTypeInfoForParameters=',UseTypeInfoForParameters,' ATypeUnitName=',ATypeUnitName]);
|
||||
DebugLn(['[TEventsCodeTool.CreateMethod] A AMethodName="',AMethodName,'" in "',MainFilename,'" UseTypeInfoForParameters=',UseTypeInfoForParameters]);
|
||||
{$ENDIF}
|
||||
// initialize class for code completion
|
||||
CodeCompleteClassNode:=ClassNode;
|
||||
@ -897,6 +897,7 @@ var
|
||||
FirstParameterNode: TCodeTreeNode;
|
||||
ProcName: PChar;
|
||||
begin
|
||||
//DebugLn(['TEventsCodeTool.CollectPublishedMethods Node=',FoundContext.Node.DescAsString]);
|
||||
if (FoundContext.Node.Desc=ctnProcedure)
|
||||
and (FoundContext.Node.Parent<>nil)
|
||||
and (FoundContext.Node.Parent.Desc=ctnClassPublished) then begin
|
||||
|
||||
@ -6177,7 +6177,10 @@ begin
|
||||
|
||||
xtString:
|
||||
begin
|
||||
// ToDo: ask scanner for shortstring, ansistring, widestring
|
||||
if (Scanner.PascalCompiler=pcDelphi)
|
||||
or ((Scanner.CompilerMode=cmDELPHI)
|
||||
or (Scanner.Values['LONGSTRINGS']='1')) then
|
||||
Result.Desc:=xtAnsiString;
|
||||
end;
|
||||
end;
|
||||
finally
|
||||
@ -6413,7 +6416,7 @@ begin
|
||||
ParamCompatibility:=IsCompatible(TargetExprParamList.Items[i],
|
||||
SourceExprType,Params);
|
||||
{$IFDEF ShowExprEval}
|
||||
DebugLn('[TFindDeclarationTool.IsParamNodeListCompatibleToExprList] B ',ExprTypeToString(TargetExprParamList.Items[i]));
|
||||
DebugLn('[TFindDeclarationTool.IsParamNodeListCompatibleToExprList] B ',ExprTypeToString(TargetExprParamList.Items[i]),' ',TypeCompatibilityNames[ParamCompatibility]);
|
||||
{$ENDIF}
|
||||
if CompatibilityList<>nil then
|
||||
CompatibilityList[i]:=ParamCompatibility;
|
||||
|
||||
Loading…
Reference in New Issue
Block a user