Skip to content

"else do" mistake handling #888

@yrashk

Description

@yrashk
defmodule M do
  def test do
    if 2>1 do
      2
    else do
      3
   end
 end
end

results in

** (TokenMissingError) test.ex:10: missing terminator: end (for "do" starting at line 1)

If you haven't seen this many many times, you'd have to spend a couple of minutes figuring out what happened. I think we can actually try making the parser complain more specifically

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions