Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

AST confused for records #33

Open
al2o3cr opened this issue Aug 25, 2018 · 0 comments
Open

AST confused for records #33

al2o3cr opened this issue Aug 25, 2018 · 0 comments

Comments

@al2o3cr
Copy link

al2o3cr commented Aug 25, 2018

Passing Elixir AST (for instance, the output of quote) triggers the "Elixir record" behavior here.

Example:

iex(3)> ast = quote do
...(3)>   foo[1].bar
...(3)> end
{{:., [], [{{:., [], [Access, :get]}, [], [{:foo, [], Elixir}, 1]}, :bar]}, [],
 []}
iex(4)> Apex.ap(ast)
{
  [0] .{
    [0] []
    [1] [
      [0] {
        [0] .{
          [0] []
          [1] [
            [0] :Elixir.Access
            [1] :get
          ]
        }
        [1] []
        [2] [
          [0] foo{
            [0] []
            [1] :Elixir
          }
          [1] 1
        ]
      }
      [1] :bar
    ]
  }
  [1] []
  [2] []
}

Would a "no srsly I don't have records here" option make sense? Something like the numbers: false setting.

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

No branches or pull requests

1 participant