elixir-tools / spitfire

Error tolerant parser for Elixir
https://www.elixir-tools.dev
MIT License
75 stars 7 forks source link

Spitfire doesn't handle nested access patterns #14

Closed lucacervello closed 9 months ago

lucacervello commented 9 months ago

Spitfire doesn't handle

foo[bar["baz"]]

Code.string_to_quoted/2 returns

{:ok,
 {{:.,
   [from_brackets: true, closing: [line: 1, column: 15], line: 1, column: 4],
   [Access, :get]},
  [from_brackets: true, closing: [line: 1, column: 15], line: 1, column: 4],
  [
    {:foo, [line: 1, column: 1], nil},
    {{:.,
      [from_brackets: true, closing: [line: 1, column: 14], line: 1, column: 8],
      [Access, :get]},
     [from_brackets: true, closing: [line: 1, column: 14], line: 1, column: 8],
     [{:bar, [line: 1, column: 5], nil}, "baz"]}
  ]}}