Allow newlines in 'import' spacing to allow nice multiline imports and avoid inelegant too long lines

This commit is contained in:
Tissevert 2020-01-03 09:47:19 +01:00
parent 9bc9b728b7
commit 1e6088ab9a
3 changed files with 6 additions and 2 deletions

View file

@ -1,5 +1,9 @@
# Revision history for SJW
## 0.1.1.0 -- 2020-01-03
* Imports can now span several lines
## 0.1.0.0 -- 2020-01-01
* First working version with a small example

View file

@ -3,7 +3,7 @@ cabal-version: >=1.10
-- further documentation, see http://haskell.org/cabal/users-guide/
name: SJW
version: 0.1.0.0
version: 0.1.1.0
synopsis: The Simple Javascript Wrench is a very simple tool to pack several JS «modules» into a single script.
-- description:
homepage: https://git.marvid.fr/Tissevert/SJW

View file

@ -42,7 +42,7 @@ recurse f initValue = recAux [] initValue
foldlWithKey (\a k b -> recAux (k:stack) a b) nextValue (children tree)
space :: Parser ()
space = takeWhile (inClass " \t") *> pure ()
space = takeWhile (inClass " \t\r\n") *> pure ()
between :: Parser a -> (Parser b, Parser c) -> Parser a
between p (left, right) = left *> space *> p <* space <* right