mhanberg / mhanberg/test

with x <- 1 do :ok else _ -> ;r end

Open
#4 0 comments 0 reactions 0 assignees View on GitHub
property-failure
Dominant language
No language data
Stars
0
Forks
0
PR merge metrics
No merged PRs in 30d

Description

Type: mismatch
Context: with_else_body

Code:
```elixir
with x <- 1 do :ok else _ ->
;r end
```

Elixir AST:
```elixir
{:with,
[do: [line: 1, column: 13], end: [line: 2, column: 4], line: 1, column: 1],
[
{:<-, [line: 1, column: 8], [{:x, [line: 1, column: 6], nil}, 1]},
[
do: :ok,
else: [
{:->, [newlines: 1, line: 1, column: 27],
[
[{:_, [line: 1, column: 25], nil}],
{:__block__, [], [nil, {:r, [line: 2, column: 2], nil}]}
]}
]
]
]}
```

Spitfire AST:
```elixir
{:with,
[do: [line: 1, column: 13], end: [line: 2, column: 4], line: 1, column: 1],
[
{:<-, [line: 1, column: 8], [{:x, [line: 1, column: 6], nil}, 1]},
[
do: :ok,
else: [
{:->, [newlines: 1, line: 1, column: 27],
[[{:_, [line: 1, column: 25], nil}], {:r, [line: 2, column: 2], nil}]}
]
]
]}
```

Contributor guide

No contributing guide indexed for this repository

Research direction

Start by comparing the Elixir and Spitfire ASTs for the with_else_body example, focusing on the else clause body and its handling of the newline. Done means Spitfire produces the same AST structure as Elixir for this input; add or run the relevant parser regression test if one exists.

Written by the indexing model from the issue text.

Assessment

Tech stack
elixir
Domain
compilers
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Clearly specified
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.