Menu

#205 Failure on conditional compilation directives

open
Formatting (69)
5
2009-01-19
2009-01-19
No

The formatter fails on conditional compilation directives ($IFDEF, etc).

It happens when attempting to format the SourceForge Report Manager project (http://reportman.sourceforge.net/)

Discussion

  • Anthony Steele

    Anthony Steele - 2009-01-26

    How to deal with conditional compilation is an issue that has come up before, and I think documentation is now needed on how to deal with it.

    http://jedicodeformat.sourceforge.net/JcfConditionalCompilation.html

    Does this answer your questions? If not, how should I improve it?

     
  • Anonymous

    Anonymous - 2009-01-27

    A few suggestions :

    1. Make the code intelligent, so that it reads the conditional defines in Project Options and also any $DEFINE/$UNDEFINE statements in the code

    2. Recognize the $IFDEF .. $ELSE .. $ENDIF situation and handle it

    3. Have an optional flag so that the formatter skips but doesn't fail on these situations (perhaps with a warning at the end of the reformatting)

     

Log in to post a comment.

Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.