Ignore:
Timestamp:
Nov 9, 2010, 11:19:28 AM (14 years ago)
Author:
george
Message:
  • Added: Support for multiple combined sections var, type, const and functions.
  • Modified: Functions for parsing types redone to return Boolean result of success.
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/Compiler/USourceCode.pas

    r8 r19  
    77
    88uses
    9   SysUtils, Variants, Classes, Dialogs;
     9  SysUtils, Variants, Classes, Dialogs, SpecializedObjectList;
    1010
    1111type
     
    165165  {$I 'GenericObjectList.inc'}
    166166
     167  TCommonBlockSection = (cbsVariable, cbsType, cbsConstant);
     168
    167169  TCommonBlock = class
    168170    Name: string;
     
    173175    Variables: TVariableList;
    174176    Functions: TFunctionList;
     177    Order: TListObject;
    175178    Code: TBeginEnd;
    176179    constructor Create; virtual;
     
    186189    Size: Integer;
    187190    UsedType: TType;
     191    Exported: Boolean;
    188192    Visibility: TTypeVisibility;
    189193  end;
     
    679683  Code.Parent := Self;
    680684  Code.CommonBlock := Self;
     685  Order := TListObject.Create;
     686  Order.OwnsObjects := False;
    681687end;
    682688
     
    688694  Functions.Free;
    689695  Code.Free;
     696  Order.Free;
    690697  inherited;
    691698end;
     
    705712  I := 0;
    706713  while (I < Count) and (LowerCase(Items[I].Name) <> LowerCase(Name)) do Inc(I);
    707   if I < Count then Result := Items[I] else Result := nil;
     714  if I < Count then Result := Items[I]
     715    else Result := nil;
    708716
    709717  // Search in parent
Note: See TracChangeset for help on using the changeset viewer.