On 2010-05-31 15:00, Mattias Gärtner wrote:
Zitat von Adem <[email protected]>:

[...]
The compiler simply discards comments and it has no infrastructure to
link comments in any way to code.

Naturally, comments are no good for the compiler --so, I am assuming that the current parser does recognise comments but does not add them to the parse tree; if so, it is fine, all it will have to do is to add those nodes while the compiler still ignores them. Would that be too difficult to add?
I think the biggest problems are the directives. The compiler parser simply skips ELSE code.
A code formatter should not ignore that parts.
How do you want to format an include file for another target?
How to handle macros?
At this moment, all I can utter will be theoretical stuff. Like, producing alternative branches for directives and formatting them. I have no idea to offer for macros though.

But, knowing that you have spent far^n more time on those issues than I am, I have a feeling (or, hope) you will have much more practicable suggestions (than mine) for those sorts of problems.

How would *you* deal with macros?

--
Cheers,

Adem


--
_______________________________________________
Lazarus mailing list
[email protected]
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus

Reply via email to