Skip to content

Conversation

@lukaszsamson
Copy link
Contributor

This PR adds a set of tests that iterative through different combinations of elixir expressions (matched, unmatched, no parens) joined by unary, binary and ternary operators. It validates if the parser correctly builds AST nodes, preserves precedence rules, operator binding power and associativity. It also exercises the parser on do blocks and no parens expressions.

mhanberg pushed a commit that referenced this pull request Jan 22, 2026
Fixes one of the errors found by #78

`Spitfire.parse("a..b..c//d")` is producing `a..(b..c//d)` instead of
`(a..(b..c))//d`.

This is due to the wrong precedence being used for `@range_op`, and the
parsing of nested ranges causing the inner range to consume the `//`
operator.
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