57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
|
# File 'lib/tapioca/compilers/symbol_table/symbol_loader.rb', line 57
def self.parse(object, parents = [])
symbols = Set.new
children = object.fetch("children", [])
children.each do |child|
kind = child.fetch("kind")
name = child.fetch("name")
name = name.fetch("name") if name.is_a?(Hash)
next if kind.nil? || name.nil?
next unless %w[CLASS CLASS_OR_MODULE STATIC_FIELD].include?(kind)
next if name =~ /[<>()$]/
next if name =~ /^[0-9]+$/
next if name == "T::Helpers"
parents << name
symbols.add(parents.join("::"))
symbols.merge(parse(child, parents))
parents.pop
end
symbols
end
|