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 : String -> Result () File
parse source = parse source =
source case Parser.parse source of
|> Parser.parse Ok file ->
|> Result.mapError (always ()) Ok (Elm.Processing.process elmProcessContext file)
|> Result.map (Elm.Processing.process elmProcessContext)
Err _ ->
Err ()
elmProcessContext : Elm.Processing.ProcessContext elmProcessContext : Elm.Processing.ProcessContext