mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-08-12 06:06:17 +02:00
* Do not escape string type name
git-svn-id: trunk@46304 -
This commit is contained in:
parent
d561021f72
commit
23290d659e
@ -174,7 +174,7 @@ type
|
|||||||
const Arg: Pointer); virtual;
|
const Arg: Pointer); virtual;
|
||||||
procedure ForEachChildCall(const aMethodCall: TOnForEachPasElement;
|
procedure ForEachChildCall(const aMethodCall: TOnForEachPasElement;
|
||||||
const Arg: Pointer; Child: TPasElement; CheckParent: boolean); virtual;
|
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 FullPath: string; // parent's names, until parent is not TPasDeclarations
|
||||||
function ParentPath: string; // parent's names
|
function ParentPath: string; // parent's names
|
||||||
function FullName: string; virtual; // FullPath + Name
|
function FullName: string; virtual; // FullPath + Name
|
||||||
@ -514,6 +514,7 @@ type
|
|||||||
Protected
|
Protected
|
||||||
Function FixTypeDecl(aDecl: String) : String;
|
Function FixTypeDecl(aDecl: String) : String;
|
||||||
public
|
public
|
||||||
|
Function SafeName : String; override;
|
||||||
function ElementTypeName: string; override;
|
function ElementTypeName: string; override;
|
||||||
end;
|
end;
|
||||||
TPasTypeArray = array of TPasType;
|
TPasTypeArray = array of TPasType;
|
||||||
@ -2591,6 +2592,14 @@ begin
|
|||||||
ProcessHints(false,Result);
|
ProcessHints(false,Result);
|
||||||
end;
|
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 TPasType.ElementTypeName: string; begin Result := SPasTreeType; end;
|
||||||
function TPasPointerType.ElementTypeName: string; begin Result := SPasTreePointerType; end;
|
function TPasPointerType.ElementTypeName: string; begin Result := SPasTreePointerType; end;
|
||||||
function TPasAliasType.ElementTypeName: string; begin Result := SPasTreeAliasType; end;
|
function TPasAliasType.ElementTypeName: string; begin Result := SPasTreeAliasType; end;
|
||||||
|
Loading…
Reference in New Issue
Block a user