elixir
elixir copied to clipboard
Code.Fragment.cursor_context/1 does not understand more complicated expressions
Environment
- Elixir & Erlang/OTP versions (elixir --version): 1.13, dev
Current behavior
this is OK
iex(1)> Code.Fragment.cursor_context("DateTime.utc_now()")
:none
but this could be improved
iex(2)> Code.Fragment.cursor_context("DateTime.utc_now().")
:none
iex(3)> Code.Fragment.cursor_context("DateTime.utc_now().ho")
:none
Expected behavior
It would be great if the return value was {:dot, {:dot_call, ..., ...}, ...} or {:dot, :expr, ...}.
This requires adding new return types, so we will move it out of v1.14 for now.