Ignore:
Timestamp:
Jun 26, 2023, 12:08:45 PM (17 months ago)
Author:
chronos
Message:
  • Added: Var function parameters support.
  • Added: Read and ReadLn procedures support.
  • Added: Interpreter now prints into console form.
File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/xpascal/Generators/GeneratorXml.pas

    r224 r230  
    1111  TGeneratorXml = class(TGenerator)
    1212  private
    13     procedure GenerateNodes(SourceNodes: TSourceNodes);
     13    procedure GenerateNodes(SourceNodes: TSourceNodeList<TSourceNode>);
    1414    procedure GenerateNode(SourceNode: TSourceNode);
    1515  public
     
    2121implementation
    2222
     23resourcestring
     24  SUnsupportedNodeType = 'Unsupported node type';
     25
    2326{ TGeneratorXml }
    2427
    25 procedure TGeneratorXml.GenerateNodes(SourceNodes: TSourceNodes);
     28procedure TGeneratorXml.GenerateNodes(SourceNodes: TSourceNodeList<TSourceNode>);
    2629var
    2730  I: Integer;
     
    3033    if SourceNodes[I] is TSourceNode then begin
    3134      GenerateNode(TSourceNode(SourceNodes[I]));
    32     end else raise Exception.Create('Unsupported node type');
     35    end else raise Exception.Create(SUnsupportedNodeType);
    3336  end;
    3437end;
     
    4245  if SourceNode = nil then begin
    4346  end else
    44   if SourceNode is TSourceNodes then begin
    45     GenerateNodes(TSourceNodes(SourceNode))
     47  if SourceNode is TSourceNodeList<TSourceNode> then begin
     48    GenerateNodes(TSourceNodeList<TSourceNode>(SourceNode))
    4649  end else
    4750  if SourceNode is TSourceNode then begin
     
    6366    AddTextLine('</' + SourceNode.ClassName + '>');
    6467  end else
    65     raise Exception.Create('Unsupported node type');
     68    raise Exception.Create(SUnsupportedNodeType);
    6669end;
    6770
Note: See TracChangeset for help on using the changeset viewer.