mirror of
https://github.com/jfmengels/elm-review.git
synced 2024-08-17 03:50:24 +03:00
Simplify FileParser.parse
This commit is contained in:
parent
f9e1d8aef8
commit
bf3f9b1469
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user