Mattias Gaertner schrieb:

Compiler errors in macros are often confusing/misleading, because the user does not see the expanded code.

That's where a compiler listing comes into the play, generated e.g. by the preprocessor option (-m).

Same for debugger positions and handling.

Not really different from conditional compilation.

Macros can confuse other parsers. For example the fcl parser or the ones in IDEs. Especially imported macros from other units and conditional macros are not supported.

True, it should be possible to re-create parsers from a common grammar.

Code editing functions in IDEs are mislead by macros especially conditional macros.

A nowadays IDE already must recognize many conditionals and declarations. It may be worth to spend some time with a consideration, what makes life hard to the coder and the CodeTools, and how this can be simplified.

Even if FPC is designed as a highly speed-optimized prodcution compiler, what's that speed gain worth when a coder spends most of its time in reading and updating source code? What about an "interactive" compiler, that can be created from the same codebase as the production compiler, but which interfaces much better with an IDE and its CodeTools?

DoDi

_______________________________________________
fpc-devel maillist  -  fpc-devel@lists.freepascal.org
http://lists.freepascal.org/mailman/listinfo/fpc-devel

Reply via email to