Skip to content

Commit

Permalink
Merge pull request #1267 from froydnj/froydnj-add-types-to-memsize
Browse files Browse the repository at this point in the history
  • Loading branch information
kddnewton authored Aug 17, 2023
2 parents f86a6a8 + e16a738 commit cfab746
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions bin/memsize
Original file line number Diff line number Diff line change
Expand Up @@ -10,14 +10,16 @@ results =
node["name"],
node.fetch("child_nodes", []).sum do |child_node|
case child_node["type"]
when "integer"
when "uint32", "constant"
4
when "node", "node?"
8
when "location", "location?"
16
when "node[]", "string", "token", "token?", "location[]"
when "node[]", "string", "token", "token?", "location[]", "constant[]"
24
when "flags"
0
else
raise "Unknown type: #{child_node["type"]}"
end
Expand Down

0 comments on commit cfab746

Please sign in to comment.