Simplify FileParser.parse

This commit is contained in:
Jeroen Engels 2022-07-01 00:12:50 +02:00
parent f9e1d8aef8
commit bf3f9b1469

View File

@ -10,10 +10,12 @@ import Review.Dependencies
-}
parse : String -> Result () File
parse source =
source
|> Parser.parse
|> Result.mapError (always ())
|> Result.map (Elm.Processing.process elmProcessContext)
case Parser.parse source of
Ok file ->
Ok (Elm.Processing.process elmProcessContext file)
Err _ ->
Err ()
elmProcessContext : Elm.Processing.ProcessContext