Ticket #27 (new bug report)

Opened 6 years ago

Last modified 4 years ago

No handling of CPP in code

Reported by: nibro Owned by: nibro
Priority: minor Milestone: Blue Sky
Component: parser Version: 1.9.x
Keywords: Cc:

Description

The hard part here is not to handle documents with CPP in them, we already use cpphs to un-literate code, it shouldn't be hard to run cpphs on it in full. But the question then is, is that really what we want to do? If we want to parse the source file, it would be interesting to be able to support all possible source trees that could result from application of CPP. That's a very different beast.

Change History

Changed 5 years ago by Neil Mitchell

I nearly always have the line (stolen from HSE 0.4.8):

parseFileContents [if "#" `isPrefixOf` x then "" else x | x <- xs]

i.e. hide all lines beginning with a #. I find this allows a nice class of programs with basic CPP to be accepted, while being very easy to implement. Perhaps CPP should turn this tweak on, until some proper CPP handling can be performed.

Changed 5 years ago by nibro

  • milestone changed from Full document support to Blue Sky

Changed 4 years ago by nibro

  • version set to 1.9.x
Note: See TracTickets for help on using tickets.