Advertisement
Guest User

DSL for TreeStructInfo

a guest
Jul 3rd, 2016
142
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Delphi 20.62 KB | None | 0 0
  1. unit TSInfoDSL;
  2.  
  3. {$mode objfpc}{$H+}
  4.  
  5. interface
  6.  
  7. uses
  8.   TSInfoConsts, TSInfoTypes, TSInfoUtils, TSInfoFiles;
  9.  
  10.  
  11. { ----- types ----------------------------------------------------------------------------------------------------- }
  12.  
  13.  
  14. { ----- simple types -------------------------------------- }
  15.  
  16.  
  17. type
  18.   TName       = type String;
  19.   TValue      = type String;
  20.   TDecComment = type String;
  21.   TDefComment = type String;
  22.  
  23.  
  24. { ----- basic elements ------------------------------------ }
  25.  
  26.  
  27. type
  28.   TAttribute = record
  29.     Reference: Boolean;
  30.     Name: TName;
  31.     Value: TValue;
  32.     Comment: TComment;
  33.   end;
  34.  
  35.  
  36. type
  37.   TChildNode = record
  38.     Reference: Boolean;
  39.     Name: TName;
  40.     Comment: TComment;
  41.     Attributes: array of TAttribute;
  42.     ChildNodes: array of TChildNode;
  43.   end;
  44.  
  45.  
  46. { ----- global functions ------------------------------------------------------------------------------------------ }
  47.  
  48.  
  49. { ----- for simple types ---------------------------------- }
  50.  
  51.  
  52. function Name(const AName: String): TName;
  53.  
  54. function Value(const AValue: String): TValue;
  55. function Value(const AValues: array of String): TValue;
  56.  
  57. function Comment(const AComment: String): TDecComment;
  58. function Comment(const AComments: array of String): TDecComment;
  59. function Comment(const AComment: String): TDefComment;
  60. function Comment(const AComments: array of String): TDefComment;
  61.  
  62. function DecComment(const AComment: String): TDecComment;
  63. function DecComment(const AComments: array of String): TDecComment;
  64. function DefComment(const AComment: String): TDefComment;
  65. function DefComment(const AComments: array of String): TDefComment;
  66.  
  67.  
  68. { ----- for standard attributes --------------------------- }
  69.  
  70.  
  71. function Attr(const AName: TName; const AValue: TValue = ''): TAttribute;
  72. function Attr(const AComment: TDecComment; const AName: TName; const AValue: TValue = ''): TAttribute;
  73.  
  74.  
  75. { ----- for standard child nodes -------------------------- }
  76.  
  77.  
  78. function Node(const AName: TName): TChildNode;
  79. function Node(const AName: TName; const AAttributes: array of TAttribute): TChildNode;
  80. function Node(const AName: TName; const AChildNodes: array of TChildNode): TChildNode;
  81. function Node(const AName: TName; const AAttributes: array of TAttribute; const AChildNodes: array of TChildNode): TChildNode;
  82. function Node(const AComment: TDecComment; const AName: TName): TChildNode;
  83. function Node(const AComment: TDecComment; const AName: TName; const AAttributes: array of TAttribute): TChildNode;
  84. function Node(const AComment: TDecComment; const AName: TName; const AChildNodes: array of TChildNode): TChildNode;
  85. function Node(const AComment: TDecComment; const AName: TName; const AAttributes: array of TAttribute; const AChildNodes: array of TChildNode): TChildNode;
  86.  
  87.  
  88. { ----- for referenced atrributes ------------------------- }
  89.  
  90.  
  91. function RefAttr(const AName: TName; const AValue: TValue = ''): TAttribute;
  92. function RefAttr(const AComment: TDecComment; const AName: TName; const AValue: TValue = ''): TAttribute;
  93. function RefAttr(const AComment: TDefComment; const AName: TName; const AValue: TValue = ''): TAttribute;
  94. function RefAttr(const ADecComment: TDecComment; const ADefComment: TDefComment; const AName: TName; const AValue: TValue = ''): TAttribute;
  95.  
  96.  
  97. { ----- for referenced child nodes ------------------------ }
  98.  
  99.  
  100. function RefNode(const AName: TName): TChildNode;
  101. function RefNode(const AName: TName; const AAttributes: array of TAttribute): TChildNode;
  102. function RefNode(const AName: TName; const AChildNodes: array of TChildNode): TChildNode;
  103. function RefNode(const AName: TName; const AAttributes: array of TAttribute; const AChildNodes: array of TChildNode): TChildNode;
  104. function RefNode(const AComment: TDecComment; const AName: TName): TChildNode;
  105. function RefNode(const AComment: TDecComment; const AName: TName; const AAttributes: array of TAttribute): TChildNode;
  106. function RefNode(const AComment: TDecComment; const AName: TName; const AChildNodes: array of TChildNode): TChildNode;
  107. function RefNode(const AComment: TDecComment; const AName: TName; const AAttributes: array of TAttribute; const AChildNodes: array of TChildNode): TChildNode;
  108. function RefNode(const AComment: TDefComment; const AName: TName): TChildNode;
  109. function RefNode(const AComment: TDefComment; const AName: TName; const AAttributes: array of TAttribute): TChildNode;
  110. function RefNode(const AComment: TDefComment; const AName: TName; const AChildNodes: array of TChildNode): TChildNode;
  111. function RefNode(const AComment: TDefComment; const AName: TName; const AAttributes: array of TAttribute; const AChildNodes: array of TChildNode): TChildNode;
  112. function RefNode(const ADecComment: TDecComment; const ADefComment: TDefComment; const AName: TName): TChildNode;
  113. function RefNode(const ADecComment: TDecComment; const ADefComment: TDefComment; const AName: TName; const AAttributes: array of TAttribute): TChildNode;
  114. function RefNode(const ADecComment: TDecComment; const ADefComment: TDefComment; const AName: TName; const AChildNodes: array of TChildNode): TChildNode;
  115. function RefNode(const ADecComment: TDecComment; const ADefComment: TDefComment; const AName: TName; const AAttributes: array of TAttribute; const AChildNodes: array of TChildNode): TChildNode;
  116.  
  117.  
  118. { ----- for main function --------------------------------- }
  119.  
  120.  
  121. function TreeStructInfo(const AName: TName = ''): TTSInfoTree;
  122. function TreeStructInfo(const AComment: TDecComment; const AName: TName = ''): TTSInfoTree;
  123. function TreeStructInfo(const AAttributes: array of TAttribute): TTSInfoTree;
  124. function TreeStructInfo(const AChildNodes: array of TChildNode): TTSInfoTree;
  125. function TreeStructInfo(const AAttributes: array of TAttribute; const AChildNodes: array of TChildNode): TTSInfoTree;
  126. function TreeStructInfo(const AName: TName; const AAttributes: array of TAttribute): TTSInfoTree;
  127. function TreeStructInfo(const AName: TName; const AChildNodes: array of TChildNode): TTSInfoTree;
  128. function TreeStructInfo(const AName: TName; const AAttributes: array of TAttribute; const AChildNodes: array of TChildNode): TTSInfoTree;
  129. function TreeStructInfo(const AComment: TDecComment; const AAttributes: array of TAttribute): TTSInfoTree;
  130. function TreeStructInfo(const AComment: TDecComment; const AChildNodes: array of TChildNode): TTSInfoTree;
  131. function TreeStructInfo(const AComment: TDecComment; const AAttributes: array of TAttribute; const AChildNodes: array of TChildNode): TTSInfoTree;
  132. function TreeStructInfo(const AComment: TDecComment; const AName: TName; const AAttributes: array of TAttribute): TTSInfoTree;
  133. function TreeStructInfo(const AComment: TDecComment; const AName: TName; const AChildNodes: array of TChildNode): TTSInfoTree;
  134. function TreeStructInfo(const AComment: TDecComment; const AName: TName; const AAttributes: array of TAttribute; const AChildNodes: array of TChildNode): TTSInfoTree;
  135.  
  136.  
  137. { ----- end interface --------------------------------------------------------------------------------------------- }
  138.  
  139.  
  140. implementation
  141.  
  142.  
  143. { ----- internal functions ---------------------------------------------------------------------------------------- }
  144.  
  145.  
  146. { ----- simple types -------------------------------------- }
  147.  
  148.  
  149. function GlueStrings(const AStrings: array of String): String;
  150. var
  151.   strToken: String;
  152. begin
  153.   Result := '';
  154.  
  155.   for strToken in AStrings do
  156.     Result += strToken + VALUES_DELIMITER;
  157.  
  158.   SetLength(Result, Length(Result) - 1);
  159. end;
  160.  
  161.  
  162. { ----- basic elements ------------------------------------ }
  163.  
  164.  
  165. function InternalAttr(const AReference: Boolean; const AName: TName; const AValue: TValue; const AComment: TComment): TAttribute; inline;
  166. begin
  167.   Result.Reference := AReference;
  168.   Result.Name := AName;
  169.   Result.Value := AValue;
  170.   Result.Comment := AComment;
  171. end;
  172.  
  173.  
  174. function InternalNode(const AReference: Boolean; const AName: TName; const AComment: TComment; const AAttributes: array of TAttribute; const AChildNodes: array of TChildNode): TChildNode;
  175. var
  176.   intElementIdx: Integer;
  177. begin
  178.   Result.Reference := AReference;
  179.   Result.Name := AName;
  180.   Result.Comment := AComment;
  181.  
  182.   SetLength(Result.Attributes, Length(AAttributes));
  183.   SetLength(Result.ChildNodes, Length(AChildNodes));
  184.  
  185.   for intElementIdx := 0 to High(AAttributes) do
  186.     Result.Attributes[intElementIdx] := AAttributes[intElementIdx];
  187.  
  188.   for intElementIdx := 0 to High(AChildNodes) do
  189.     Result.ChildNodes[intElementIdx] := AChildNodes[intElementIdx];
  190. end;
  191.  
  192.  
  193. procedure InternalAddElements(ATSInfoTree: TTSInfoTree; AAttributes: array of TAttribute; AChildNodes: array of TChildNode);
  194. var
  195.   attrAdd: TAttribute;
  196.   nodeAdd: TChildNode;
  197. begin
  198.   for attrAdd in AAttributes do
  199.   begin
  200.     ATSInfoTree.CreateAttribute('~', attrAdd.Reference, attrAdd.Name);
  201.     ATSInfoTree.WriteString(attrAdd.Name, attrAdd.Value);
  202.     ATSInfoTree.WriteAttributeComment(attrAdd.Name, attrAdd.Comment[ctDeclaration], '', ctDeclaration);
  203.     ATSInfoTree.WriteAttributeComment(attrAdd.Name, attrAdd.Comment[ctDefinition], '', ctDefinition);
  204.   end;
  205.  
  206.   for nodeAdd in AChildNodes do
  207.   begin
  208.     ATSInfoTree.CreateChildNode('~', nodeAdd.Reference, nodeAdd.Name);
  209.     ATSInfoTree.WriteChildNodeComment(nodeAdd.Name, nodeAdd.Comment[ctDeclaration], '', ctDeclaration);
  210.     ATSInfoTree.WriteChildNodeComment(nodeAdd.Name, nodeAdd.Comment[ctDefinition], '', ctDefinition);
  211.  
  212.     ATSInfoTree.OpenChildNode(nodeAdd.Name);
  213.     InternalAddElements(ATSInfoTree, nodeAdd.Attributes, nodeAdd.ChildNodes);
  214.     ATSInfoTree.GoToParentNode();
  215.   end;
  216. end;
  217.  
  218.  
  219. function InternalTreeStructInfo(const AComment: TDecComment; const AName: TName; const AAttributes: array of TAttribute; const AChildNodes: array of TChildNode): TTSInfoTree;
  220. begin
  221.   Result := TTSInfoTree.Create();
  222.   Result.WriteTreeComment(AComment, '');
  223.   Result.RenameTree(AName);
  224.  
  225.   InternalAddElements(Result, AAttributes, AChildNodes);
  226. end;
  227.  
  228.  
  229. { ----- global functions ------------------------------------------------------------------------------------------ }
  230.  
  231.  
  232. { ----- for simple types ---------------------------------- }
  233.  
  234.  
  235. function Name(const AName: String): TName;
  236. begin
  237.   Result := AName;
  238. end;
  239.  
  240.  
  241. function Value(const AValue: String): TValue;
  242. begin
  243.   Result := AValue;
  244. end;
  245.  
  246.  
  247. function Value(const AValues: array of String): TValue;
  248. begin
  249.   Result := GlueStrings(AValues);
  250. end;
  251.  
  252.  
  253. function Comment(const AComment: String): TDecComment;
  254. begin
  255.   Result := AComment;
  256. end;
  257.  
  258.  
  259. function Comment(const AComments: array of String): TDecComment;
  260. begin
  261.   Result := GlueStrings(AComments);
  262. end;
  263.  
  264.  
  265. function Comment(const AComment: String): TDefComment;
  266. begin
  267.   Result := AComment;
  268. end;
  269.  
  270.  
  271. function Comment(const AComments: array of String): TDefComment;
  272. begin
  273.   Result := GlueStrings(AComments);
  274. end;
  275.  
  276.  
  277. function DecComment(const AComment: String): TDecComment;
  278. begin
  279.   Result := AComment;
  280. end;
  281.  
  282.  
  283. function DefComment(const AComment: String): TDefComment;
  284. begin
  285.   Result := AComment;
  286. end;
  287.  
  288.  
  289. function DecComment(const AComments: array of String): TDecComment;
  290. begin
  291.   Result := GlueStrings(AComments);
  292. end;
  293.  
  294.  
  295. function DefComment(const AComments: array of String): TDefComment;
  296. begin
  297.   Result := GlueStrings(AComments);
  298. end;
  299.  
  300.  
  301. { ----- for standard attributes --------------------------- }
  302.  
  303.  
  304. function Attr(const AName: TName; const AValue: TValue): TAttribute;
  305. begin
  306.   Result := InternalAttr(False, AName, AValue, TSInfoUtils.Comment('', ''));
  307. end;
  308.  
  309.  
  310. function Attr(const AComment: TDecComment; const AName: TName; const AValue: TValue): TAttribute;
  311. begin
  312.   Result := InternalAttr(False, AName, AValue, TSInfoUtils.Comment(AComment, ''));
  313. end;
  314.  
  315.  
  316. { ----- for standard child nodes -------------------------- }
  317.  
  318.  
  319. function Node(const AName: TName): TChildNode;
  320. begin
  321.   Result := InternalNode(False, AName, TSInfoUtils.Comment('', ''), [], []);
  322. end;
  323.  
  324.  
  325. function Node(const AName: TName; const AAttributes: array of TAttribute): TChildNode;
  326. begin
  327.   Result := InternalNode(False, AName, TSInfoUtils.Comment('', ''), AAttributes, []);
  328. end;
  329.  
  330.  
  331. function Node(const AName: TName; const AChildNodes: array of TChildNode): TChildNode;
  332. begin
  333.   Result := InternalNode(False, AName, TSInfoUtils.Comment('', ''), [], AChildNodes);
  334. end;
  335.  
  336.  
  337. function Node(const AName: TName; const AAttributes: array of TAttribute; const AChildNodes: array of TChildNode): TChildNode;
  338. begin
  339.   Result := InternalNode(False, AName, TSInfoUtils.Comment('', ''), AAttributes, AChildNodes);
  340. end;
  341.  
  342.  
  343. function Node(const AComment: TDecComment; const AName: TName): TChildNode;
  344. begin
  345.   Result := InternalNode(False, AName, TSInfoUtils.Comment(AComment, ''), [], []);
  346. end;
  347.  
  348.  
  349. function Node(const AComment: TDecComment; const AName: TName; const AAttributes: array of TAttribute): TChildNode;
  350. begin
  351.   Result := InternalNode(False, AName, TSInfoUtils.Comment(AComment, ''), AAttributes, []);
  352. end;
  353.  
  354.  
  355. function Node(const AComment: TDecComment; const AName: TName; const AChildNodes: array of TChildNode): TChildNode;
  356. begin
  357.   Result := InternalNode(False, AName, TSInfoUtils.Comment(AComment, ''), [], AChildNodes);
  358. end;
  359.  
  360.  
  361. function Node(const AComment: TDecComment; const AName: TName; const AAttributes: array of TAttribute; const AChildNodes: array of TChildNode): TChildNode;
  362. begin
  363.   Result := InternalNode(False, AName, TSInfoUtils.Comment(AComment, ''), AAttributes, AChildNodes);
  364. end;
  365.  
  366.  
  367. { ----- for referenced attributes ------------------------- }
  368.  
  369.  
  370. function RefAttr(const AName: TName; const AValue: TValue): TAttribute;
  371. begin
  372.   Result := InternalAttr(True, AName, AValue, TSInfoUtils.Comment('', ''));
  373. end;
  374.  
  375.  
  376. function RefAttr(const AComment: TDecComment; const AName: TName; const AValue: TValue): TAttribute;
  377. begin
  378.   Result := InternalAttr(True, AName, AValue, TSInfoUtils.Comment(AComment, ''));
  379. end;
  380.  
  381.  
  382. function RefAttr(const AComment: TDefComment; const AName: TName; const AValue: TValue): TAttribute;
  383. begin
  384.   Result := InternalAttr(True, AName, AValue, TSInfoUtils.Comment('', AComment));
  385. end;
  386.  
  387.  
  388. function RefAttr(const ADecComment: TDecComment; const ADefComment: TDefComment; const AName: TName; const AValue: TValue): TAttribute;
  389. begin
  390.   Result := InternalAttr(True, AName, AValue, TSInfoUtils.Comment(ADecComment, ADefComment));
  391. end;
  392.  
  393.  
  394. { ----- for referenced child nodes ------------------------ }
  395.  
  396.  
  397. function RefNode(const AName: TName): TChildNode;
  398. begin
  399.   Result := InternalNode(True, AName, TSInfoUtils.Comment('', ''), [], []);
  400. end;
  401.  
  402.  
  403. function RefNode(const AName: TName; const AAttributes: array of TAttribute): TChildNode;
  404. begin
  405.   Result := InternalNode(True, AName, TSInfoUtils.Comment('', ''), AAttributes, []);
  406. end;
  407.  
  408.  
  409. function RefNode(const AName: TName; const AChildNodes: array of TChildNode): TChildNode;
  410. begin
  411.   Result := InternalNode(True, AName, TSInfoUtils.Comment('', ''), [], AChildNodes);
  412. end;
  413.  
  414.  
  415. function RefNode(const AName: TName; const AAttributes: array of TAttribute; const AChildNodes: array of TChildNode): TChildNode;
  416. begin
  417.   Result := InternalNode(True, AName, TSInfoUtils.Comment('', ''), AAttributes, AChildNodes);
  418. end;
  419.  
  420.  
  421. function RefNode(const AComment: TDecComment; const AName: TName): TChildNode;
  422. begin
  423.   Result := InternalNode(True, AName, TSInfoUtils.Comment(AComment, ''), [], []);
  424. end;
  425.  
  426.  
  427. function RefNode(const AComment: TDecComment; const AName: TName; const AAttributes: array of TAttribute): TChildNode;
  428. begin
  429.   Result := InternalNode(True, AName, TSInfoUtils.Comment(AComment, ''), AAttributes, []);
  430. end;
  431.  
  432.  
  433. function RefNode(const AComment: TDecComment; const AName: TName; const AChildNodes: array of TChildNode): TChildNode;
  434. begin
  435.   Result := InternalNode(True, AName, TSInfoUtils.Comment(AComment, ''), [], AChildNodes);
  436. end;
  437.  
  438.  
  439. function RefNode(const AComment: TDecComment; const AName: TName; const AAttributes: array of TAttribute; const AChildNodes: array of TChildNode): TChildNode;
  440. begin
  441.   Result := InternalNode(True, AName, TSInfoUtils.Comment(AComment, ''), AAttributes, AChildNodes);
  442. end;
  443.  
  444.  
  445. function RefNode(const AComment: TDefComment; const AName: TName): TChildNode;
  446. begin
  447.   Result := InternalNode(True, AName, TSInfoUtils.Comment('', AComment), [], []);
  448. end;
  449.  
  450.  
  451. function RefNode(const AComment: TDefComment; const AName: TName; const AAttributes: array of TAttribute): TChildNode;
  452. begin
  453.   Result := InternalNode(True, AName, TSInfoUtils.Comment('', AComment), AAttributes, []);
  454. end;
  455.  
  456.  
  457. function RefNode(const AComment: TDefComment; const AName: TName; const AChildNodes: array of TChildNode): TChildNode;
  458. begin
  459.   Result := InternalNode(True, AName, TSInfoUtils.Comment('', AComment), [], AChildNodes);
  460. end;
  461.  
  462.  
  463. function RefNode(const AComment: TDefComment; const AName: TName; const AAttributes: array of TAttribute; const AChildNodes: array of TChildNode): TChildNode;
  464. begin
  465.   Result := InternalNode(True, AName, TSInfoUtils.Comment('', AComment), AAttributes, AChildNodes);
  466. end;
  467.  
  468.  
  469. function RefNode(const ADecComment: TDecComment; const ADefComment: TDefComment; const AName: TName): TChildNode;
  470. begin
  471.   Result := InternalNode(True, AName, TSInfoUtils.Comment(ADecComment, ADefComment), [], []);
  472. end;
  473.  
  474.  
  475. function RefNode(const ADecComment: TDecComment; const ADefComment: TDefComment; const AName: TName; const AAttributes: array of TAttribute): TChildNode;
  476. begin
  477.   Result := InternalNode(True, AName, TSInfoUtils.Comment(ADecComment, ADefComment), AAttributes, []);
  478. end;
  479.  
  480.  
  481. function RefNode(const ADecComment: TDecComment; const ADefComment: TDefComment; const AName: TName; const AChildNodes: array of TChildNode): TChildNode;
  482. begin
  483.   Result := InternalNode(True, AName, TSInfoUtils.Comment(ADecComment, ADefComment), [], AChildNodes);
  484. end;
  485.  
  486.  
  487. function RefNode(const ADecComment: TDecComment; const ADefComment: TDefComment; const AName: TName; const AAttributes: array of TAttribute; const AChildNodes: array of TChildNode): TChildNode;
  488. begin
  489.   Result := InternalNode(True, AName, TSInfoUtils.Comment(ADecComment, ADefComment), AAttributes, AChildNodes);
  490. end;
  491.  
  492.  
  493. { ----- for main function --------------------------------- }
  494.  
  495.  
  496. function TreeStructInfo(const AName: TName): TTSInfoTree;
  497. begin
  498.   Result := InternalTreeStructInfo('', AName, [], []);
  499. end;
  500.  
  501.  
  502. function TreeStructInfo(const AComment: TDecComment; const AName: TName): TTSInfoTree;
  503. begin
  504.   Result := InternalTreeStructInfo(AComment, AName, [], []);
  505. end;
  506.  
  507.  
  508. function TreeStructInfo(const AAttributes: array of TAttribute): TTSInfoTree;
  509. begin
  510.   Result := InternalTreeStructInfo('', '', AAttributes, []);
  511. end;
  512.  
  513.  
  514. function TreeStructInfo(const AChildNodes: array of TChildNode): TTSInfoTree;
  515. begin
  516.   Result := InternalTreeStructInfo('', '', [], AChildNodes);
  517. end;
  518.  
  519.  
  520. function TreeStructInfo(const AAttributes: array of TAttribute; const AChildNodes: array of TChildNode): TTSInfoTree;
  521. begin
  522.   Result := InternalTreeStructInfo('', '', AAttributes, AChildNodes);
  523. end;
  524.  
  525.  
  526. function TreeStructInfo(const AName: TName; const AAttributes: array of TAttribute): TTSInfoTree;
  527. begin
  528.   Result := InternalTreeStructInfo('', AName, AAttributes, []);
  529. end;
  530.  
  531.  
  532. function TreeStructInfo(const AName: TName; const AChildNodes: array of TChildNode): TTSInfoTree;
  533. begin
  534.   Result := InternalTreeStructInfo('', AName, [], AChildNodes);
  535. end;
  536.  
  537.  
  538. function TreeStructInfo(const AName: TName; const AAttributes: array of TAttribute; const AChildNodes: array of TChildNode): TTSInfoTree;
  539. begin
  540.   Result := InternalTreeStructInfo('', AName, AAttributes, AChildNodes);
  541. end;
  542.  
  543.  
  544. function TreeStructInfo(const AComment: TDecComment; const AAttributes: array of TAttribute): TTSInfoTree;
  545. begin
  546.   Result := InternalTreeStructInfo(AComment, '', AAttributes, []);
  547. end;
  548.  
  549.  
  550. function TreeStructInfo(const AComment: TDecComment; const AChildNodes: array of TChildNode): TTSInfoTree;
  551. begin
  552.   Result := InternalTreeStructInfo(AComment, '', [], AChildNodes);
  553. end;
  554.  
  555.  
  556. function TreeStructInfo(const AComment: TDecComment; const AAttributes: array of TAttribute; const AChildNodes: array of TChildNode): TTSInfoTree;
  557. begin
  558.   Result := InternalTreeStructInfo(AComment, '', AAttributes, AChildNodes);
  559. end;
  560.  
  561.  
  562. function TreeStructInfo(const AComment: TDecComment; const AName: TName; const AAttributes: array of TAttribute): TTSInfoTree;
  563. begin
  564.   Result := InternalTreeStructInfo(AComment, AName, AAttributes, []);
  565. end;
  566.  
  567.  
  568. function TreeStructInfo(const AComment: TDecComment; const AName: TName; const AChildNodes: array of TChildNode): TTSInfoTree;
  569. begin
  570.   Result := InternalTreeStructInfo(AComment, AName, [], AChildNodes);
  571. end;
  572.  
  573.  
  574. function TreeStructInfo(const AComment: TDecComment; const AName: TName; const AAttributes: array of TAttribute; const AChildNodes: array of TChildNode): TTSInfoTree;
  575. begin
  576.   Result := InternalTreeStructInfo(AComment, AName, AAttributes, AChildNodes);
  577. end;
  578.  
  579.  
  580. { ----- end implementation ---------------------------------------------------------------------------------------- }
  581.  
  582.  
  583. end.
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement