Changeset 230 for branches/xpascal/Generators/GeneratorXml.pas
- Timestamp:
- Jun 26, 2023, 12:08:45 PM (17 months ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/xpascal/Generators/GeneratorXml.pas
r224 r230 11 11 TGeneratorXml = class(TGenerator) 12 12 private 13 procedure GenerateNodes(SourceNodes: TSourceNode s);13 procedure GenerateNodes(SourceNodes: TSourceNodeList<TSourceNode>); 14 14 procedure GenerateNode(SourceNode: TSourceNode); 15 15 public … … 21 21 implementation 22 22 23 resourcestring 24 SUnsupportedNodeType = 'Unsupported node type'; 25 23 26 { TGeneratorXml } 24 27 25 procedure TGeneratorXml.GenerateNodes(SourceNodes: TSourceNode s);28 procedure TGeneratorXml.GenerateNodes(SourceNodes: TSourceNodeList<TSourceNode>); 26 29 var 27 30 I: Integer; … … 30 33 if SourceNodes[I] is TSourceNode then begin 31 34 GenerateNode(TSourceNode(SourceNodes[I])); 32 end else raise Exception.Create( 'Unsupported node type');35 end else raise Exception.Create(SUnsupportedNodeType); 33 36 end; 34 37 end; … … 42 45 if SourceNode = nil then begin 43 46 end else 44 if SourceNode is TSourceNode sthen begin45 GenerateNodes(TSourceNode s(SourceNode))47 if SourceNode is TSourceNodeList<TSourceNode> then begin 48 GenerateNodes(TSourceNodeList<TSourceNode>(SourceNode)) 46 49 end else 47 50 if SourceNode is TSourceNode then begin … … 63 66 AddTextLine('</' + SourceNode.ClassName + '>'); 64 67 end else 65 raise Exception.Create( 'Unsupported node type');68 raise Exception.Create(SUnsupportedNodeType); 66 69 end; 67 70
Note:
See TracChangeset
for help on using the changeset viewer.