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, [EMAIL PROTECTED]

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.

_______________________________________________
fpc-devel maillist  -  [email protected]
http://lists.freepascal.org/mailman/listinfo/fpc-devel

Reply via email to