You've already forked lazarus-ccr
"CaseSensitive" fixes.
git-svn-id: https://svn.code.sf.net/p/lazarus-ccr/svn@2144 8e941d3f-bd1b-0410-a28a-d453659cc2b4
This commit is contained in:
@@ -123,11 +123,11 @@ begin
|
|||||||
cltyp.ObjKind := okClass;
|
cltyp.ObjKind := okClass;
|
||||||
mdl.InterfaceSection.Declarations.Add(cltyp);
|
mdl.InterfaceSection.Declarations.Add(cltyp);
|
||||||
mdl.InterfaceSection.Types.Add(cltyp);
|
mdl.InterfaceSection.Types.Add(cltyp);
|
||||||
AddProperty('intField','integer','1210',ptField);
|
AddProperty('intField','int','1210',ptField);
|
||||||
AddProperty('strField','string','azerty',ptField);
|
AddProperty('strField','string','azerty',ptField);
|
||||||
AddProperty('floatField','float','1234',ptField);
|
AddProperty('floatField','float','1234',ptField);
|
||||||
AddProperty('strAtt','string','attribute azerty',ptAttribute);
|
AddProperty('strAtt','string','attribute azerty',ptAttribute);
|
||||||
AddProperty('intAtt','integer','789',ptAttribute);
|
AddProperty('intAtt','int','789',ptAttribute);
|
||||||
|
|
||||||
locDoc := CreateDoc();
|
locDoc := CreateDoc();
|
||||||
g := CreateGenerator(locDoc);
|
g := CreateGenerator(locDoc);
|
||||||
@@ -193,12 +193,12 @@ begin
|
|||||||
cltyp.ObjKind := okClass;
|
cltyp.ObjKind := okClass;
|
||||||
mdl.InterfaceSection.Declarations.Add(cltyp);
|
mdl.InterfaceSection.Declarations.Add(cltyp);
|
||||||
mdl.InterfaceSection.Types.Add(cltyp);
|
mdl.InterfaceSection.Types.Add(cltyp);
|
||||||
p := AddProperty('intField','integer','',ptField,'uri-4#a','1210');
|
p := AddProperty('intField','int','',ptField,'uri-4#a','1210');
|
||||||
tr.Properties.SetValue(p,'uri-4#b','uri-5#xx');
|
tr.Properties.SetValue(p,'uri-4#b','uri-5#xx');
|
||||||
AddProperty('strField','string','azerty',ptField,'uri-4#a','http://www.w3.org/2001/XMLSchema#int');
|
AddProperty('strField','string','azerty',ptField,'uri-4#a','http://www.w3.org/2001/XMLSchema#int');
|
||||||
AddProperty('floatField','float','',ptField,'','');
|
AddProperty('floatField','float','',ptField,'','');
|
||||||
AddProperty('strAtt','string','attribute azerty',ptAttribute,'uri-4#a','optional');
|
AddProperty('strAtt','string','attribute azerty',ptAttribute,'uri-4#a','optional');
|
||||||
AddProperty('intAtt','integer','',ptAttribute,'','');
|
AddProperty('intAtt','int','',ptAttribute,'','');
|
||||||
|
|
||||||
locDoc := CreateDoc();
|
locDoc := CreateDoc();
|
||||||
g := CreateGenerator(locDoc);
|
g := CreateGenerator(locDoc);
|
||||||
@@ -260,7 +260,7 @@ begin
|
|||||||
cltyp.AncestorType.AddRef();
|
cltyp.AncestorType.AddRef();
|
||||||
mdl.InterfaceSection.Declarations.Add(cltyp);
|
mdl.InterfaceSection.Declarations.Add(cltyp);
|
||||||
mdl.InterfaceSection.Types.Add(cltyp);
|
mdl.InterfaceSection.Types.Add(cltyp);
|
||||||
AddProperty('intAtt','integer','',ptAttribute);
|
AddProperty('intAtt','int','',ptAttribute);
|
||||||
|
|
||||||
cltyp := TPasClassType(tr.CreateElement(TPasClassType,'TExtendBase64String',mdl.InterfaceSection,visDefault,'',0));
|
cltyp := TPasClassType(tr.CreateElement(TPasClassType,'TExtendBase64String',mdl.InterfaceSection,visDefault,'',0));
|
||||||
cltyp.ObjKind := okClass;
|
cltyp.ObjKind := okClass;
|
||||||
@@ -337,11 +337,11 @@ begin
|
|||||||
cltyp.AncestorType.AddRef();
|
cltyp.AncestorType.AddRef();
|
||||||
mdl.InterfaceSection.Declarations.Add(cltyp);
|
mdl.InterfaceSection.Declarations.Add(cltyp);
|
||||||
mdl.InterfaceSection.Types.Add(cltyp);
|
mdl.InterfaceSection.Types.Add(cltyp);
|
||||||
AddProperty('intField','integer','',ptField);
|
AddProperty('intField','int','',ptField);
|
||||||
AddProperty('strField','string','',ptField);
|
AddProperty('strField','string','',ptField);
|
||||||
AddProperty('floatField','float','',ptField);
|
AddProperty('floatField','float','',ptField);
|
||||||
AddProperty('strAtt','string','',ptAttribute);
|
AddProperty('strAtt','string','',ptAttribute);
|
||||||
AddProperty('intAtt','integer','',ptAttribute);
|
AddProperty('intAtt','int','',ptAttribute);
|
||||||
|
|
||||||
locDoc := CreateDoc();
|
locDoc := CreateDoc();
|
||||||
g := CreateGenerator(locDoc);
|
g := CreateGenerator(locDoc);
|
||||||
@@ -404,7 +404,7 @@ begin
|
|||||||
mdl.InterfaceSection.Declarations.Add(cltyp);
|
mdl.InterfaceSection.Declarations.Add(cltyp);
|
||||||
mdl.InterfaceSection.Types.Add(cltyp);
|
mdl.InterfaceSection.Types.Add(cltyp);
|
||||||
AddProperty('strAtt','string','',ptAttribute);
|
AddProperty('strAtt','string','',ptAttribute);
|
||||||
AddProperty('intAtt','integer','',ptAttribute);
|
AddProperty('intAtt','int','',ptAttribute);
|
||||||
|
|
||||||
locDoc := CreateDoc();
|
locDoc := CreateDoc();
|
||||||
g := CreateGenerator(locDoc);
|
g := CreateGenerator(locDoc);
|
||||||
|
@@ -337,6 +337,7 @@ end;
|
|||||||
function TTest_CustomXsdParser.ParseDoc(const ADoc: string): TwstPasTreeContainer;
|
function TTest_CustomXsdParser.ParseDoc(const ADoc: string): TwstPasTreeContainer;
|
||||||
begin
|
begin
|
||||||
Result := ParseDoc(ADoc,False);
|
Result := ParseDoc(ADoc,False);
|
||||||
|
Result.DefaultSearchNameKinds := NAME_KINDS_DEFAULT;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
procedure TTest_CustomXsdParser.EmptySchema();
|
procedure TTest_CustomXsdParser.EmptySchema();
|
||||||
@@ -779,7 +780,7 @@ begin
|
|||||||
CheckIs(elt,TPasClassType);
|
CheckIs(elt,TPasClassType);
|
||||||
clsType := elt as TPasClassType;
|
clsType := elt as TPasClassType;
|
||||||
CheckNotNull(clsType.AncestorType,'AncestorType is null');
|
CheckNotNull(clsType.AncestorType,'AncestorType is null');
|
||||||
CheckSame(tr.FindElementNS('TComplexStringContentRemotable',sXSD_NS),clsType.AncestorType);
|
CheckSame(tr.FindElementNS('TComplexStringContentRemotable',sXSD_NS),clsType.AncestorType,clsType.AncestorType.Name);
|
||||||
|
|
||||||
prpLs.Clear();
|
prpLs.Clear();
|
||||||
for i := 0 to Pred(clsType.Members.Count) do begin
|
for i := 0 to Pred(clsType.Members.Count) do begin
|
||||||
|
@@ -3261,9 +3261,15 @@ var
|
|||||||
oldCurrent, mdl : TPasModule;
|
oldCurrent, mdl : TPasModule;
|
||||||
i : PtrInt;
|
i : PtrInt;
|
||||||
mdlList : TList;
|
mdlList : TList;
|
||||||
|
oldCS : Boolean;
|
||||||
|
oldNamesKinds : TElementNameKinds;
|
||||||
begin
|
begin
|
||||||
|
oldCS := SymbolTable.CaseSensitive;
|
||||||
|
oldNamesKinds := SymbolTable.DefaultSearchNameKinds;
|
||||||
oldCurrent := SymbolTable.CurrentModule;
|
oldCurrent := SymbolTable.CurrentModule;
|
||||||
try
|
try
|
||||||
|
SymbolTable.CaseSensitive := False;
|
||||||
|
SymbolTable.DefaultSearchNameKinds := [elkName];
|
||||||
mdlList := SymbolTable.Package.Modules;
|
mdlList := SymbolTable.Package.Modules;
|
||||||
for i := 0 to Pred(mdlList.Count) do begin
|
for i := 0 to Pred(mdlList.Count) do begin
|
||||||
mdl := TPasModule(mdlList[i]);
|
mdl := TPasModule(mdlList[i]);
|
||||||
@@ -3275,6 +3281,8 @@ begin
|
|||||||
end;
|
end;
|
||||||
finally
|
finally
|
||||||
SymbolTable.SetCurrentModule(oldCurrent);
|
SymbolTable.SetCurrentModule(oldCurrent);
|
||||||
|
SymbolTable.CaseSensitive := oldCS;
|
||||||
|
SymbolTable.DefaultSearchNameKinds := oldNamesKinds;
|
||||||
end;
|
end;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
|
@@ -326,6 +326,8 @@ procedure AddSystemSymbol(
|
|||||||
ADest.InterfaceSection.Declarations.Add(splTyp);
|
ADest.InterfaceSection.Declarations.Add(splTyp);
|
||||||
ADest.InterfaceSection.Types.Add(splTyp);
|
ADest.InterfaceSection.Types.Add(splTyp);
|
||||||
typlst[i] := splTyp;
|
typlst[i] := splTyp;
|
||||||
|
end;
|
||||||
|
for i := Low(SIMPLE_TYPES) to High(SIMPLE_TYPES) do begin
|
||||||
s := SIMPLE_TYPES[i][1];
|
s := SIMPLE_TYPES[i][1];
|
||||||
if not IsStrEmpty(s) then begin
|
if not IsStrEmpty(s) then begin
|
||||||
syb := AContainer.FindElementInModule(SIMPLE_TYPES[i][1],ADest) as TPasNativeSimpleContentClassType;
|
syb := AContainer.FindElementInModule(SIMPLE_TYPES[i][1],ADest) as TPasNativeSimpleContentClassType;
|
||||||
@@ -334,7 +336,7 @@ procedure AddSystemSymbol(
|
|||||||
ADest.InterfaceSection.Declarations.Add(syb);
|
ADest.InterfaceSection.Declarations.Add(syb);
|
||||||
ADest.InterfaceSection.Types.Add(syb);
|
ADest.InterfaceSection.Types.Add(syb);
|
||||||
end;
|
end;
|
||||||
splTyp.SetExtendableType(syb);
|
typlst[i].SetExtendableType(syb);
|
||||||
end;
|
end;
|
||||||
end;
|
end;
|
||||||
for i := Low(SIMPLE_TYPES) to High(SIMPLE_TYPES) do begin
|
for i := Low(SIMPLE_TYPES) to High(SIMPLE_TYPES) do begin
|
||||||
@@ -483,6 +485,7 @@ begin
|
|||||||
AddAlias('anyURI','string',Result);
|
AddAlias('anyURI','string',Result);
|
||||||
AddAlias('ID','string',Result);
|
AddAlias('ID','string',Result);
|
||||||
//AddAlias('float','Single',Result);
|
//AddAlias('float','Single',Result);
|
||||||
|
AddAlias('integer','int',Result);
|
||||||
AddAlias('nonNegativeInteger','LongWord',Result);
|
AddAlias('nonNegativeInteger','LongWord',Result);
|
||||||
AddAlias('positiveInteger','nonNegativeInteger',Result);
|
AddAlias('positiveInteger','nonNegativeInteger',Result);
|
||||||
{$IFNDEF WST_HAS_TDURATIONREMOTABLE}
|
{$IFNDEF WST_HAS_TDURATIONREMOTABLE}
|
||||||
|
@@ -196,8 +196,8 @@ destructor TWsdlParser.Destroy();
|
|||||||
var
|
var
|
||||||
j : PtrInt;
|
j : PtrInt;
|
||||||
begin
|
begin
|
||||||
if Assigned(AList) then begin
|
if Assigned(AList) and (AList.Count > 0) then begin
|
||||||
for j := 0 to Pred(AList.Count) do begin
|
for j := Pred(AList.Count) downto 0 do begin
|
||||||
AList.Objects[j].Free();
|
AList.Objects[j].Free();
|
||||||
AList.Objects[j] := nil;
|
AList.Objects[j] := nil;
|
||||||
end;
|
end;
|
||||||
|
@@ -236,8 +236,8 @@ destructor TCustomXsdSchemaParser.Destroy();
|
|||||||
var
|
var
|
||||||
j : PtrInt;
|
j : PtrInt;
|
||||||
begin
|
begin
|
||||||
if Assigned(AList) then begin
|
if Assigned(AList) and (AList.Count > 0) then begin
|
||||||
for j := 0 to Pred(AList.Count) do begin
|
for j := Pred(AList.Count) downto 0 do begin
|
||||||
AList.Objects[j].Free();
|
AList.Objects[j].Free();
|
||||||
AList.Objects[j] := nil;
|
AList.Objects[j] := nil;
|
||||||
end;
|
end;
|
||||||
|
Reference in New Issue
Block a user