Language.Preprocessor.Cpphs.MacroPass

| cpphs | Source code | Contents | Index
Language.Preprocessor.Cpphs.MacroPass |
Portability | All
Stability | experimental
Maintainer | Malcolm Wallace <Malcolm.Wallace@cs.york.ac.uk>
Description
Perform a cpp.second-pass, accumulating #define's and #undef's, whilst doing symbol replacement and macro expansion.
Synopsis
macroPass :: [(String, String)] -> BoolOptions -> [(Posn, String)] -> String
preDefine :: BoolOptions -> [(String, String)] -> SymTab HashDefine
defineMacro :: BoolOptions -> String -> (String, HashDefine)
Documentation
macroPass | Source
:: [(String, String)] | Pre-defined symbols and their values
-> BoolOptions | Options that alter processing style
-> [(Posn, String)] | The input file content
-> String | The file after processing
Walk through the document, replacing calls of macros with the expanded RHS.
preDefine :: BoolOptions -> [(String, String)] -> SymTab HashDefine | Source
Turn command-line definitions (from `-D`) into `HashDefine`s.
defineMacro :: BoolOptions -> String -> (String, HashDefine) | Source
Turn a string representing a macro definition into a `HashDefine`.
Produced by Haddock version 0.8