mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-11-01 13:49:34 +01:00
* Fixed writing of open array declaration
git-svn-id: trunk@7326 -
This commit is contained in:
parent
2212c78609
commit
0e79eb1fe6
@ -1401,6 +1401,10 @@ end;
|
|||||||
{ Returns the new CodeEl, which will be the old CodeEl in most cases }
|
{ Returns the new CodeEl, which will be the old CodeEl in most cases }
|
||||||
function THTMLWriter.AppendType(CodeEl, TableEl: TDOMElement;
|
function THTMLWriter.AppendType(CodeEl, TableEl: TDOMElement;
|
||||||
Element: TPasType; Expanded: Boolean; NestingLevel: Integer): TDOMElement;
|
Element: TPasType; Expanded: Boolean; NestingLevel: Integer): TDOMElement;
|
||||||
|
|
||||||
|
Var
|
||||||
|
S : String;
|
||||||
|
|
||||||
begin
|
begin
|
||||||
Result := CodeEl;
|
Result := CodeEl;
|
||||||
|
|
||||||
@ -1412,9 +1416,15 @@ begin
|
|||||||
// Array
|
// Array
|
||||||
if Element.ClassType = TPasArrayType then
|
if Element.ClassType = TPasArrayType then
|
||||||
begin
|
begin
|
||||||
AppendPasSHFragment(CodeEl,
|
S:='array ';
|
||||||
'array [' + TPasArrayType(Element).IndexRange + '] of ', 0);
|
If (TPasArrayType(Element).IndexRange<>'') then
|
||||||
Result := AppendType(CodeEl, TableEl, TPasArrayType(Element).ElType, False);
|
S:=S+'[' + TPasArrayType(Element).IndexRange + '] ';
|
||||||
|
S:=S+'of ';
|
||||||
|
If (TPasArrayType(Element).ElType=Nil) then
|
||||||
|
S:=S+'Const';
|
||||||
|
AppendPasSHFragment(CodeEl,S,0);
|
||||||
|
If (TPasArrayType(Element).ElType<>Nil) then
|
||||||
|
Result := AppendType(CodeEl, TableEl, TPasArrayType(Element).ElType, False);
|
||||||
end else
|
end else
|
||||||
// Procedure or funtion type
|
// Procedure or funtion type
|
||||||
if Element.InheritsFrom(TPasProcedureType) then
|
if Element.InheritsFrom(TPasProcedureType) then
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user