Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add support for Swift macro declarations #1355

Merged
merged 3 commits into from
Aug 7, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 5 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,11 @@
* Update Javascript: jQuery 3.6.3, KaTeX 0.16.4
[John Fairhurst](https://github.com/johnfairh)

* Support Swift 5.9 `package` access control level.
* Support Swift `package` access control level.
[John Fairhurst](https://github.com/johnfairh)

* Initial support for Swift macro declarations. Requires
`--swift-build-tool symbolgraph`.
[John Fairhurst](https://github.com/johnfairh)

##### Bug Fixes
Expand Down
4 changes: 4 additions & 0 deletions lib/jazzy/source_declaration/type.rb
Original file line number Diff line number Diff line change
Expand Up @@ -456,6 +456,10 @@ def ==(other)
jazzy: 'Associated Type',
dash: 'Alias',
}.freeze,
'source.lang.swift.decl.macro' => {
jazzy: 'Macro',
dash: 'Macro',
}.freeze,
}.freeze
end
# rubocop:enable Metrics/ClassLength
Expand Down
1 change: 1 addition & 0 deletions lib/jazzy/symbol_graph/symbol.rb
Original file line number Diff line number Diff line change
Expand Up @@ -100,6 +100,7 @@ def init_func_signature(func_signature)
'typealias' => 'typealias',
'associatedtype' => 'associatedtype',
'actor' => 'actor',
'macro' => 'macro',
}.freeze

# We treat 'static var' differently to 'class var'
Expand Down
2 changes: 2 additions & 0 deletions spec/integration_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -119,6 +119,8 @@ def configure_cocoapods
s.replace_pattern(/<unknown>:0: remark.*?\n/, '')
# CLIntegracon 0.8
s.replace_pattern(%r{/transformed/}, '/')
# Xcode 15 workaround
s.replace_pattern(/objc\[.....\]: Class _?DTX\w+ is implemented in both.*?\n/, '')
end

require 'shellwords'
Expand Down
2 changes: 1 addition & 1 deletion spec/integration_specs
Submodule integration_specs updated 125 files