Skip to content

Commit

Permalink
Allow the let keyword to be on its own line.
Browse files Browse the repository at this point in the history
  • Loading branch information
noteed committed Jul 3, 2024
1 parent 69530f4 commit e396a4c
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 0 deletions.
3 changes: 3 additions & 0 deletions examples/let.html
Original file line number Diff line number Diff line change
Expand Up @@ -4,3 +4,6 @@
<p>
1 5
</p>
<p>
4 11
</p>
6 changes: 6 additions & 0 deletions examples/let.slab
Original file line number Diff line number Diff line change
Expand Up @@ -13,3 +13,9 @@ let f = 1
g
= 2 + 3
p #(f) #(g)

let
h = 4
i
= 5 + 6
p #(h) #(i)
1 change: 1 addition & 0 deletions src/Slab/Parse.hs
Original file line number Diff line number Diff line change
Expand Up @@ -622,6 +622,7 @@ parserLet =
parserAssignVar :: Parser (L.IndentOpt Parser Block Block)
parserAssignVar = do
_ <- lexeme (string "let")
scn
blockIndent <- getSourcePos
pairs <- some $ do
initialIndent <- getSourcePos
Expand Down

0 comments on commit e396a4c

Please sign in to comment.