Skip to content

Commit 6117497

Browse files
committed
Improve error message for pipe syntax
1 parent f985ab1 commit 6117497

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

compiler/frontend/ast_exp_apply.ml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -197,7 +197,8 @@ let app_exp_mapper (e : exp) (self : Bs_ast_mapper.mapper) : exp =
197197
| _ -> Location.raise_errorf ~loc "invalid #= assignment"))
198198
| Some {op = "->"; loc} ->
199199
Location.raise_errorf ~loc
200-
"invalid |. syntax, it can only be used as binary operator"
200+
"Invalid pipe syntax. The pipe symbol (->) can only be used as a binary \
201+
operator."
201202
| Some {op = "##"; loc} ->
202203
Location.raise_errorf ~loc
203204
"Js object ## expect syntax like obj##(paint (a,b)) "

0 commit comments

Comments
 (0)