Hi!

On 27.04.2010 17:19, Michael Van Canneyt wrote:

Also, program files are not parsed by fcl-passrc, it's limited to units
for now. We would like to be able to eventually parse program files too.

I am all for it. It should not be hard to handle this; It's like parsing
an implementation block, with an extra flag that it should expect a
begin/end instead of initialization/finalization block.


I don't know whether you know that or fcl-passrc supports that, but the begin/end block is also possible in a unit:

=== code begin ===
unit unitbegin;

interface

function Foo: Integer;

implementation

function Foo: Integer;
begin
  Foo := 42;
end;

begin
  Writeln(Foo);
end.
=== code end ===

This compiles without errors and the begin/end block is treated as an initialization block.

Regards,
Sven
_______________________________________________
fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
http://lists.freepascal.org/mailman/listinfo/fpc-pascal

Reply via email to