Skip to content

Conversation

@jonatanklosko
Copy link
Member

Currently, the AST does not distinguish between Foo.foo and Foo."foo". This adds :delimiter meta to the call root (where the identifier location is also stored), so similarly to atoms:

iex(1)> Code.string_to_quoted!(~S[:"🐈"],
...(1)>   token_metadata: true,
...(1)>   literal_encoder: &{:ok, {:__block__, &2, [&1]}}
...(1)> )
{:__block__, [delimiter: "\"", line: 1], [:"🐈"]}
iex(2)> Code.string_to_quoted!(~S[Foo."🐈"],
...(2)>   token_metadata: true,
...(2)>   literal_encoder: &{:ok, {:__block__, &2, [&1]}}
...(2)> )
{{:., [line: 1], [{:__aliases__, [last: [line: 1], line: 1], [:Foo]}, :"🐈"]},
 [no_parens: true, delimiter: "\"", line: 1], []}

@josevalim josevalim merged commit ee90126 into elixir-lang:main Nov 5, 2024
9 checks passed
@josevalim
Copy link
Member

💚 💙 💜 💛 ❤️

@jonatanklosko jonatanklosko deleted the jk-remote-call-quoted-meta branch November 5, 2024 12:14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

2 participants