Commit 221fe49
authored
fix: handle ellipsis before <-, ::, and when (#114)
Ellipsis standalone detection used is_binary_op?/1, but that set did not
include in_match_op, type_op, or when_op. As a result, expressions like
x...<-y and x...::y attempted to parse <-/:: as an ellipsis RHS prefix
and failed with unknown token errors.
Extend @binary_op_types with when_op, in_match_op, and type_op so
parse_ellipsis_op/1 keeps ... standalone before those operators,
matching Elixir AST behavior.
Add regression assertions in the existing property regression block for
x...<-y, x...::y, and x... when y alongside the newline ternary case.1 parent 52099ff commit 221fe49
2 files changed
Lines changed: 7 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1757 | 1757 | | |
1758 | 1758 | | |
1759 | 1759 | | |
| 1760 | + | |
| 1761 | + | |
| 1762 | + | |
1760 | 1763 | | |
1761 | 1764 | | |
1762 | 1765 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2316 | 2316 | | |
2317 | 2317 | | |
2318 | 2318 | | |
| 2319 | + | |
| 2320 | + | |
| 2321 | + | |
| 2322 | + | |
2319 | 2323 | | |
2320 | 2324 | | |
2321 | 2325 | | |
| |||
0 commit comments