Skip to content

Comments

fix: handle ellipsis before <-, ::, and when#114

Open
mkaput wants to merge 1 commit intoelixir-tools:mainfrom
mkaput:mk/pr-8b50284-ellipsis-ops
Open

fix: handle ellipsis before <-, ::, and when#114
mkaput wants to merge 1 commit intoelixir-tools:mainfrom
mkaput:mk/pr-8b50284-ellipsis-ops

Conversation

@mkaput
Copy link
Contributor

@mkaput mkaput commented Feb 18, 2026

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.

@mkaput mkaput force-pushed the mk/pr-8b50284-ellipsis-ops branch from f378b07 to 065ec79 Compare February 18, 2026 09:31
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.
@mkaput mkaput force-pushed the mk/pr-8b50284-ellipsis-ops branch from 065ec79 to caa2ffc Compare February 19, 2026 13:12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant