[fpc-devel] OO rewrite - globals

Florian Klämpfl florian at freepascal.org
Sun Jul 25 22:15:34 CEST 2010


Am 25.07.2010 12:05, schrieb Hans-Peter Diettrich:
> It looks to me as if a ppu reader can provide the information for
> previously compiled modules, so that a scanner/parser is not always
> required to load a used module?

Probably no.

> 
> Parser
> now is derived from the tscannerfile class.

This is a really ugly design OOP wise ...

> 
> Most parser units have been split into .pas and .inc files. The .pas
> files mostly contain declarations, that can not be moved into the parser
> unit without causing circular unit references.

Why don't you use separate parser classes for different purposes?
Declarations, Function bodies, expressions etc.?

> 
> 
> All the current_xyz variables must become class elements. Who knows
> about the scope and lifetime of these "current" objects, and can give
> hints where to move these references?

Probably nobody, it is a trial and error process.



More information about the fpc-devel mailing list