[fpc-devel] fpdoc and macros (-Sm)

Michael Van Canneyt michael at freepascal.org
Mon Jun 20 16:30:52 CEST 2005



On Mon, 20 Jun 2005, Stefan Kisdaroczi wrote:

> Hi,
>
> I tried fpdoc (fpc 2.0.0,win2000) and it crashes because it seems not to expand macros.
>
> Example unit:
>
> UNIT fpdoctest1;
> {$DEFINE HELLO:=//}
> HELLO WORLD;
> INTERFACE
> IMPLEMENTATION
> END.
>
> It compiles ok :
>> fpc -Sm fpdoctest1.pas
> Target OS: Win32 for i386
> Compiling fpdoctest1.pas
> 11 Lines compiled, 0.0 sec
>
> fpdoc failes:
>> fpdoc --package=test --input='-Sm fpdoctest1.pas'
> FPDoc - Free Pascal Documentation Tool
> (c) 2000 - 2003 Areca Systems GmbH / Sebastian Guenther, sg at freepascal.org
>
> fpdoctest1.pas(5,5): Expected "interface" at token "Identifier HELLO"
> An unhandled exception occurred at $0040E3DC :
> EAccessViolation : Access violation
>  $0040E3DC
>  $0040E317
>  $00402417
>  $004027B6
>
> I need this type of defines, even if it looks strange...
> It's not a urgent problem, but it would be nice if it works.
>
> Should this work ?

One day, yes.

> It is known not to work ?

It is known that support for macros is missing...

> What needs to be done (and where) to make this work ?

pscanner.pp in fcl/passrc needs to have macro support.

Michael.




More information about the fpc-devel mailing list