with x <- 1 do :ok else _ -> ;d end
- 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 _ ->
;d 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, {:d, [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}], {:d, [line: 2, column: 2], nil}]}
]
]
]}
```
Contributor guide
No contributing guide indexed for this repository
Research direction
Reproduce the supplied with/else example and compare the Elixir AST with the Spitfire AST, focusing on the multiline else body and its __block__ node. Trace the parser handling for the with_else_body context; done means Spitfire emits the same AST shape as Elixir for this case.
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
- Mostly clear
- Newbie friendliness
- 35/100