@@ -301,10 +301,6 @@ letDefNamedParser =
301301 |> Parser.skip spaceParser
302302 |> Parser.keep
303303 (Type.expression
304- |> Parser.scopedUpdatePayload
305- var.start.col
306- .indent
307- (\nextValue payload -> { payload | indent = nextValue })
308304 |> Parser.mapError TypeError
309305 )
310306 |> Parser.skip
@@ -321,12 +317,17 @@ letDefNamedParser =
321317 else
322318 Parser.succeed {}
323319 )
324-
320+
325321 )
326322 |> Parser.skip spaceParser
327323 , Parser.succeed Nothing
328324 ]
329325 )
326+ -- TODO: How to reverse this?
327+ |> Parser.scopedUpdatePayload
328+ var.start.col
329+ .indent
330+ (\nextValue payload -> { payload | indent = nextValue })
330331 |> Parser.keep (Parser.loop [] (functionArgsParser "="))
331332 |> Parser.skip spaceParser
332333 |> Parser.keep (Parser.lazy (\_ -> parser))
@@ -446,6 +447,10 @@ whenParser =
446447 endLocation
447448 (AST.When { expression = expr, branches = branches })
448449 )
450+ |> Parser.scopedUpdatePayload
451+ start.col
452+ .indent
453+ (\value payload -> { payload | indent = value })
449454 )
450455
451456whenBranchParser : Parser Context Error AST.WhenBranch
@@ -456,7 +461,6 @@ whenBranchParser =
456461 |> Parser.skip (Parser.keyword "->" (ExpectedKeyword "->"))
457462 |> Parser.skip spaceParser
458463 |> Parser.keep (Parser.lazy (\_ -> parser))
459- |> Parser.skip spaceParser
460464
461465
462466whenBranchLoopParser : Array AST.WhenBranch -> Parser Context Error (Parser.Step (Array AST.WhenBranch) (Array AST.WhenBranch))
0 commit comments