ireaderpas.pp 1.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354
  1. {
  2. This file is part of the Free Component Library (FCL)
  3. Copyright (c) 2012 by the Free Pascal development team
  4. Pascal text reader
  5. See the file COPYING.FPC, included in this distribution,
  6. for details about the copyright.
  7. This program is distributed in the hope that it will be useful,
  8. but WITHOUT ANY WARRANTY; without even the implied warranty of
  9. MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
  10. **********************************************************************}
  11. unit IReaderPAS;
  12. {$mode objfpc}{$H+}
  13. interface
  14. uses
  15. Classes, fpIndexer, IReaderTXT;
  16. type
  17. { TIReaderPAS }
  18. TIReaderPAS = class(TIReaderTXT)
  19. private
  20. protected
  21. function AllowedToken(token: UTF8String): boolean; override;
  22. public
  23. procedure LoadFromStream(FileStream: TStream); override;
  24. end;
  25. implementation
  26. { TIReaderPAS }
  27. function TIReaderPAS.AllowedToken(token: UTF8String): boolean;
  28. begin
  29. Result:=inherited AllowedToken(token);
  30. end;
  31. procedure TIReaderPAS.LoadFromStream(FileStream: TStream);
  32. begin
  33. inherited LoadFromStream(FileStream);
  34. end;
  35. initialization
  36. FileHandlers.RegisterFileReader('Pascal format', 'pas', TIReaderPAS);
  37. end.