76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
|
# File 'lib/tapioca/compilers/symbol_table/symbol_loader.rb', line 76
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
|