Skip to content

Commit b42d726

Browse files
committed
♻️ Use separator for sequence calls
1 parent 8caef68 commit b42d726

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/spark/parse.gleam

+2-2
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,7 @@ fn function() -> Parser(ast.Declaration) {
7070
ctx.InFunction(name),
7171
{
7272
use _ <- do(chomp.token(token.Backslash))
73-
sequence1(ident(), chomp.token(token.Comma))
73+
sequence1(ident(), separator(token.Comma))
7474
}
7575
|> chomp.or([]),
7676
)
@@ -287,7 +287,7 @@ fn lambda_like() -> Parser(ast.Expression) {
287287
// of parameters, we have this intermediate parser so we don't have to use
288288
// backtracking.
289289
use _ <- do(chomp.token(token.Backslash))
290-
use parameters <- do(chomp.sequence(ident(), chomp.token(token.Comma)))
290+
use parameters <- do(chomp.sequence(ident(), separator(token.Comma)))
291291

292292
chomp.one_of([do_lambda(parameters), do_backpass(parameters)])
293293
|> chomp.or_error("I expected a lambda or backpass (-> or <-)")

0 commit comments

Comments
 (0)