Skip to content
Prev Previous commit
Put array lit location on contents
Signed-off-by: Alexandre Terrasa <alexandre.terrasa@shopify.com>
  • Loading branch information
Morriar committed Mar 23, 2023
commit 3a480407fd83897b861b29157d4d12f8bf28acb4
4 changes: 1 addition & 3 deletions lib/syntax_tree/parser.rb
Original file line number Diff line number Diff line change
Expand Up @@ -629,12 +629,10 @@ def on_array(contents)
location: lbracket.location.to(rbracket.location)
)
else
tstring_end = consume_tstring_end(contents.lbracket.location)

ArrayLiteral.new(
lbracket: contents.lbracket,
contents: contents.contents,
location: contents.location.to(tstring_end.location)
location: contents.location
)
end
end
Expand Down