Ignore:
Timestamp:
Jan 16, 2018, 3:40:08 PM (6 years ago)
Author:
chronos
Message:
  • Modified: Better line indentation in generator.
File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/easy compiler/USourceCode.pas

    r142 r143  
    3636
    3737  TSourceTypes = class(TObjectList)
     38    Parent: TSourceTypes;
    3839    function AddNew(Name: string; ClassType: TSourceValueClass): TSourceType;
    3940    function Search(Name: string): TSourceType;
     
    5051
    5152  TSourceVariables = class(TObjectList)
     53    Parent: TSourceVariables;
    5254    function AddNew(Name: string; ValueType: TSourceType): TSourceVariable;
    5355    function Search(Name: string): TSourceVariable;
     
    107109
    108110  TSourceConstants = class(TObjectList)
     111    Parent: TSourceConstants;
    109112    function AddNewString(Value: string; Name: string = ''): TSourceConstant;
    110113    function AddNewInteger(Value: Integer; Name: string = ''): TSourceConstant;
     
    141144    procedure InitFunctions;
    142145  public
     146    Functions: TSourceFunctions;
    143147    Types: TSourceTypes;
    144148    Variables: TSourceVariables;
    145149    Constants: TSourceConstants;
    146     Functions: TSourceFunctions;
    147150    Main: TSourceBeginEnd;
    148151    constructor Create;
     
    186189    Break;
    187190  end;
     191  if not Assigned(Result) and Assigned(Parent) then
     192    Result := Parent.Search(Name);
    188193end;
    189194
     
    278283    Break;
    279284  end;
     285  if not Assigned(Result) and Assigned(Parent) then
     286    Result := Parent.Search(Name);
    280287end;
    281288
     
    312319    Break;
    313320  end;
     321  if not Assigned(Result) and Assigned(Parent) then
     322    Result := Parent.Search(Name);
    314323end;
    315324
Note: See TracChangeset for help on using the changeset viewer.