-
Notifications
You must be signed in to change notification settings - Fork 3.5k
Closed
Milestone
Description
Environment
- Elixir & Erlang/OTP versions (elixir --version): 1.13.0
- Operating system: Mac OS Big Sur 11.6
Current behavior
When the following snippet is evaluated:
# foo.exs
defmodule Foo do
:hello
It shows the following error:
** (TokenMissingError) foo.exs:3:1: missing terminator: end (for "do" starting at line 1)
|
3 |
| ^
(elixir 1.13.0) lib/code.ex:1183: Code.require_file/2
The tokenizer raises the token missing error when reaching the EOF, then mentioning a line that doesn't exist (file line count + 1, in this case, 3), and the exception displays an empty line.
Expected behavior
Either:
- show a special indicator of EOF in the snippet
- mention in the exception message that the file ended
- mention in the exception message that the file ended & don't show the snippet
Metadata
Metadata
Assignees
Labels
No labels