elixir icon indicating copy to clipboard operation
elixir copied to clipboard

Code.Fragment.cursor_context/1 does not understand more complicated expressions

Open lukaszsamson opened this issue 3 years ago • 1 comments

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, ...}.

lukaszsamson avatar May 27 '22 12:05 lukaszsamson

This requires adding new return types, so we will move it out of v1.14 for now.

josevalim avatar Jun 20 '22 13:06 josevalim