nixfmt-0.4.0: An opinionated formatter for Nix

Safe HaskellNone
LanguageHaskell2010

Nixfmt.Parser

Synopsis

Documentation

ann :: (a -> b) -> Parser a -> Parser (Ann b) Source #

rawSymbol :: Token -> Parser Token Source #

parses a token without parsing trivia after it

stripFirstLine :: [[StringPart]] -> [[StringPart]] Source #

Strip the first line of a string if it is empty.

splitLines :: [StringPart] -> [[StringPart]] Source #

Split a list of StringParts on the newlines in their TextParts. Invariant: result is never empty.