summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPaulo Daniel Gonzalez <pdgonzalez872@gmail.com>2022-01-07 13:41:26 -0600
committerGitHub <noreply@github.com>2022-01-07 20:41:26 +0100
commit0774e4c3854ba2a3894ba0fb1de29defe747345d (patch)
tree88802922577247faafd17e9901106789b85088ce
parent9929dddaed613f7f4809af5e119403a85defb989 (diff)
downloadelixir-0774e4c3854ba2a3894ba0fb1de29defe747345d.tar.gz
Add nudge to do expression error (#11552)
Closes https://github.com/elixir-lang/elixir/issues/11551
-rw-r--r--lib/elixir/src/elixir_tokenizer.erl3
1 files changed, 2 insertions, 1 deletions
diff --git a/lib/elixir/src/elixir_tokenizer.erl b/lib/elixir/src/elixir_tokenizer.erl
index 375965fe6..8009d70d1 100644
--- a/lib/elixir/src/elixir_tokenizer.erl
+++ b/lib/elixir/src/elixir_tokenizer.erl
@@ -1535,7 +1535,8 @@ invalid_do_error(Prefix) ->
" end\n\n"
"or the equivalent construct:\n\n"
" if(some_condition?, do: :this, else: :that)\n\n"
- "where \"some_condition?\" is the first argument and the second argument is a keyword list"}.
+ "where \"some_condition?\" is the first argument and the second argument is a keyword list.\n\n"
+ "You may see this error if you forget a trailing comma before the \"do\" in a \"do\" block"}.
invalid_do_with_fn_error(Prefix) ->
{Prefix, ". Anonymous functions are written as:\n\n"