* Do not escape string type name

git-svn-id: trunk@46304 -
This commit is contained in:
michael 2020-08-06 22:28:25 +00:00
parent d561021f72
commit 23290d659e

View File

@ -174,7 +174,7 @@ type
const Arg: Pointer); virtual;
procedure ForEachChildCall(const aMethodCall: TOnForEachPasElement;
const Arg: Pointer; Child: TPasElement; CheckParent: boolean); virtual;
Function SafeName : String; // Name but with & prepended if name is a keyword.
Function SafeName : String; virtual; // Name but with & prepended if name is a keyword.
function FullPath: string; // parent's names, until parent is not TPasDeclarations
function ParentPath: string; // parent's names
function FullName: string; virtual; // FullPath + Name
@ -514,6 +514,7 @@ type
Protected
Function FixTypeDecl(aDecl: String) : String;
public
Function SafeName : String; override;
function ElementTypeName: string; override;
end;
TPasTypeArray = array of TPasType;
@ -2591,6 +2592,14 @@ begin
ProcessHints(false,Result);
end;
function TPasType.SafeName: String;
begin
if SameText(Name,'string') then
Result:=Name
else
Result:=inherited SafeName;
end;
function TPasType.ElementTypeName: string; begin Result := SPasTreeType; end;
function TPasPointerType.ElementTypeName: string; begin Result := SPasTreePointerType; end;
function TPasAliasType.ElementTypeName: string; begin Result := SPasTreeAliasType; end;