fourmolu-0.1.0.0: A formatter for Haskell source code
Safe HaskellSafe-Inferred
LanguageHaskell2010

Ormolu.Processing.Cpp

Description

Support for CPP.

Synopsis

Documentation

data State Source #

State of the CPP processor.

Constructors

Outside

Outside of CPP directives

InConditional

In a conditional expression

InContinuation

In a continuation (after \)

Instances

Instances details
Eq State Source # 
Instance details

Defined in Ormolu.Processing.Cpp

Methods

(==) :: State -> State -> Bool #

(/=) :: State -> State -> Bool #

Show State Source # 
Instance details

Defined in Ormolu.Processing.Cpp

Methods

showsPrec :: Int -> State -> ShowS #

show :: State -> String #

showList :: [State] -> ShowS #

processLine :: String -> State -> (String, State) Source #

Automatically mask the line when needed and update the State.

unmaskLine :: Text -> Text Source #

If the given line is masked, unmask it. Otherwise return the line unchanged.