lib/jazzy/symbol_graph/symbol.rb in jazzy-0.14.3 vs lib/jazzy/symbol_graph/symbol.rb in jazzy-0.14.4
- old
+ new
@@ -98,20 +98,21 @@
'type.subscript' => 'function.subscript',
'static.subscript' => 'function.subscript',
'typealias' => 'typealias',
'associatedtype' => 'associatedtype',
'actor' => 'actor',
+ 'macro' => 'macro',
}.freeze
# We treat 'static var' differently to 'class var'
# We treat actors as first-class entities
def adjust_kind_for_declaration(kind, keywords)
if kind == 'swift.class' && keywords.member?('actor')
return 'swift.actor'
end
return kind unless keywords.member?('static')
- kind.gsub(/type/, 'static')
+ kind.gsub('type', 'static')
end
def init_kind(kind, keywords)
adjusted = adjust_kind_for_declaration(kind, keywords)
sourcekit_kind = KIND_MAP[adjusted.sub('swift.', '')]