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

enh(swift) add isolated/nonisolated keywords #3296

Merged
merged 4 commits into from
Jul 31, 2021
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.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
5 changes: 5 additions & 0 deletions CHANGES.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,12 +8,17 @@ Parser:

- fix(types) Fix some type definition issues (#3274) [Josh Goebel][]

Grammars:

- enh(swift) Add `isolated`/`nonisolated` keywords (#3296) [Bradley Mackey][]

New Languages:

- Added 3rd party X# grammar to SUPPORTED_LANGUAGES [Patrick Kruselburger][]

[Josh Goebel]: https://github.com/joshgoebel
[Patrick Kruselburger]: https://github.com/PatrickKru
[Bradley Mackey]: https://github.com/bradleymackey


## Version 11.1.0
Expand Down
2 changes: 2 additions & 0 deletions src/languages/lib/kws_swift.js
Original file line number Diff line number Diff line change
Expand Up @@ -73,6 +73,8 @@ export const keywords = [
'internal',
'in',
'is', // operator
'isolated', // contextual
'nonisolated', // contextual
'lazy', // contextual
'let',
'mutating', // contextual
Expand Down
1 change: 1 addition & 0 deletions test/markup/swift/keywords.expect.txt
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ x <span class="hljs-keyword">is</span> <span class="hljs-type">String</span>
<span class="hljs-keyword">fileprivate(set)</span> <span class="hljs-keyword">internal(set)</span> <span class="hljs-keyword">open(set)</span> <span class="hljs-keyword">private(set)</span> <span class="hljs-keyword">public(set)</span>
<span class="hljs-keyword">unowned(safe)</span> <span class="hljs-keyword">unowned(unsafe)</span>
<span class="hljs-keyword">async</span> <span class="hljs-keyword">await</span>
<span class="hljs-keyword">isolated</span> <span class="hljs-keyword">nonisolated</span>

<span class="hljs-keyword">#if</span>
<span class="hljs-keyword">#error</span>(<span class="hljs-string">&quot;Error&quot;</span>)
Expand Down
1 change: 1 addition & 0 deletions test/markup/swift/keywords.txt
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ true false nil
fileprivate(set) internal(set) open(set) private(set) public(set)
unowned(safe) unowned(unsafe)
async await
isolated nonisolated

#if
#error("Error")
Expand Down