mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-08-18 04:49:20 +02:00
webidltopas: started split TWebIDLToPas2js
This commit is contained in:
parent
b4cf545a94
commit
a653a4e0e9
@ -40,6 +40,7 @@ Type
|
|||||||
coAddOptionsToHeader
|
coAddOptionsToHeader
|
||||||
);
|
);
|
||||||
TBaseConversionOptions = Set of TBaseConversionOption;
|
TBaseConversionOptions = Set of TBaseConversionOption;
|
||||||
|
|
||||||
const
|
const
|
||||||
BaseConversionOptionName: array[TBaseConversionOption] of string = (
|
BaseConversionOptionName: array[TBaseConversionOption] of string = (
|
||||||
'ExpandUnionTypeArgs',
|
'ExpandUnionTypeArgs',
|
||||||
@ -161,6 +162,7 @@ type
|
|||||||
p2jcoExternalConst
|
p2jcoExternalConst
|
||||||
);
|
);
|
||||||
TPas2jsConversionOptions = Set of TPas2jsConversionOption;
|
TPas2jsConversionOptions = Set of TPas2jsConversionOption;
|
||||||
|
|
||||||
const
|
const
|
||||||
Pas2jsConversionOptionNames: array[TPas2jsConversionOption] of string = (
|
Pas2jsConversionOptionNames: array[TPas2jsConversionOption] of string = (
|
||||||
'DictionaryAsClass',
|
'DictionaryAsClass',
|
||||||
@ -178,6 +180,7 @@ type
|
|||||||
Protected
|
Protected
|
||||||
// Auxiliary routines
|
// Auxiliary routines
|
||||||
function AllocatePasName(D: TIDLDefinition; ParentName: String=''): TPasData; override;
|
function AllocatePasName(D: TIDLDefinition; ParentName: String=''): TPasData; override;
|
||||||
|
procedure GetOptions(L: TStrings; Full: boolean); override;
|
||||||
function GetTypeName(const aTypeName: String; ForTypeDef: Boolean=False
|
function GetTypeName(const aTypeName: String; ForTypeDef: Boolean=False
|
||||||
): String; override;
|
): String; override;
|
||||||
// Code generation routines. Return the number of actually written defs.
|
// Code generation routines. Return the number of actually written defs.
|
||||||
@ -295,6 +298,12 @@ begin
|
|||||||
end;
|
end;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
|
procedure TWebIDLToPas2js.GetOptions(L: TStrings; Full: boolean);
|
||||||
|
begin
|
||||||
|
inherited GetOptions(L, Full);
|
||||||
|
L.Add('Extended Options : '+Pas2jsConversionOptionsToStr(Pas2jsOptions));
|
||||||
|
end;
|
||||||
|
|
||||||
function TWebIDLToPas2js.GetTypeName(const aTypeName: String;
|
function TWebIDLToPas2js.GetTypeName(const aTypeName: String;
|
||||||
ForTypeDef: Boolean): String;
|
ForTypeDef: Boolean): String;
|
||||||
|
|
||||||
@ -1419,7 +1428,6 @@ begin
|
|||||||
L.Add('InputFileName : '+InputFileName);
|
L.Add('InputFileName : '+InputFileName);
|
||||||
L.Add('OutputFileName : '+OutputFileName);
|
L.Add('OutputFileName : '+OutputFileName);
|
||||||
end;
|
end;
|
||||||
L.Add('Options : '+BaseConversionOptionsToStr(BaseOptions));
|
|
||||||
L.Add('Keyword prefix : '+KeywordPrefix);
|
L.Add('Keyword prefix : '+KeywordPrefix);
|
||||||
L.Add('Keyword suffix : '+KeywordSuffix);
|
L.Add('Keyword suffix : '+KeywordSuffix);
|
||||||
L.Add('Class prefix : '+ClassPrefix);
|
L.Add('Class prefix : '+ClassPrefix);
|
||||||
@ -1438,6 +1446,7 @@ begin
|
|||||||
L.Add('Include interface code : '+CodeInfo(IncludeInterfaceCode));
|
L.Add('Include interface code : '+CodeInfo(IncludeInterfaceCode));
|
||||||
L.Add('Include implementation code : '+CodeInfo(IncludeImplementationCode));
|
L.Add('Include implementation code : '+CodeInfo(IncludeImplementationCode));
|
||||||
end;
|
end;
|
||||||
|
L.Add('Base Options : '+BaseConversionOptionsToStr(BaseOptions));
|
||||||
end;
|
end;
|
||||||
|
|
||||||
procedure TBaseWebIDLToPas.AddOptionsToHeader;
|
procedure TBaseWebIDLToPas.AddOptionsToHeader;
|
||||||
|
Loading…
Reference in New Issue
Block a user