cpphs

PortabilityAll
Stabilityexperimental
MaintainerMalcolm Wallace <Malcolm.Wallace@cs.york.ac.uk>

Language.Preprocessor.Cpphs.HashDefine

Description

What structures are declared in a #define.

Synopsis

Documentation

data ArgOrText

Macro expansion text is divided into sections, each of which is classified as one of three kinds: a formal argument (Arg), plain text (Text), or a stringised formal argument (Str).

Constructors

Arg 
Text 
Str 

expandMacro :: HashDefine -> [String] -> Bool -> String

Expand an instance of a macro. Precondition: got a match on the macro name.

parseHashDefine :: Bool -> [String] -> Maybe HashDefine

Parse a #define, or #undef, ignoring other # directives