def all_struct_fields(arr, struct)
      struct["fields"].each do |f|
        arr << f
      end

      if struct["extends"]
        parent = @structs[struct["extends"]]
        if parent
          return all_struct_fields(arr, parent)
        end
      end

      return arr
    end
def all_struct_fields(arr, struct)
      struct["fields"].each do |f|
        arr << f
      end

      if struct["extends"]
        parent = @structs[struct["extends"]]
        if parent
          return all_struct_fields(arr, parent)
        end
      end

      return arr
    end
Recursively resolves all fields for the struct and its ancestors

 Returns an Array with all the fields