hpp-0.6.5: A Haskell pre-processor
Safe HaskellSafe-Inferred
LanguageHaskell2010

Hpp.Conditional

Description

Parsing functionality for pre-processor conditionals.

Synopsis

Documentation

dropBranch :: (HasError m, HasHppState m, Monad m) => Parser m [TOKEN] () Source #

Drop the rest of a conditional expression incrementing the given LineNum by the number of lines skipped.

takeBranch :: LineNum -> [[TOKEN]] -> [[TOKEN]] Source #

Take everything up to the end of this branch, drop all remaining branches (if any).