[lazarus] PASDOC

Michael Van Canneyt michael.vancanneyt at wisa.be
Tue Mar 7 06:48:18 EST 2000




On Tue, 7 Mar 2000, Martin Waldenburg wrote:

> Hi!
> 
> Michael Van Canneyt wrote:
> > I know it, but does it compile with Free Pascal ?
> > Pasdoc does, since it was (at least partially) developed using Free Pascal.
> 
> The Pascal HighLighter of mwEdit is stripped from the lexer
> at DECAM.
> If the Pascal HighLighter compiles, the lexer should do it too.

I had a look at the code.

Have a look at the 'uses' clause:

 SysUtils, Windows, Messages, Classes, Controls, mwPasLexTypes, mwPasLex,
  mwSimplePasParTypes, Dialogs;

To be usable by Free Pascal, this should be reduced to

  SysUtils,Classes,  mwPasLexTypes, mwPasLex, mwSimplePasParTypes,

Windows, messages, controls and dialogs have no place in a parser.
The same is true for the mwpaslex unit. But I assume you don't need them,
that they are inserted by Delphi by default.

Then, Free Pascal gets stuck on mwpaslextypes :

function ptTokenName(Value: TptTokenKind): string;
begin
  result := GetEnumName(TypeInfo(TptTokenKind), Integer(Value));
end;

I assume the typinfo call is something of Delphi 5 ? the call doesn't
exist in Free Pascal.

(Florian: Apparently this should become an internal function of
Free Pascal, since I see no other way of doing this)

There are some more errors; the

  inherited;
  
construct is not provided. In Free pascal you must write the call again
explicitly, with it's arguments.

(Florian, I don't remember what the problem was with implementing this ? )

So for the moment, using this unit is not possible, but if you are willing
to make some slight changes to accomodate Free Pascal, it should be possible.


Michael.






More information about the Lazarus mailing list