-
Notifications
You must be signed in to change notification settings - Fork 226
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
Remove "key.offset" and "key.length" from results of dictWithCommentMarkNamesCursorInfo()
#219
Conversation
…MarkNamesCursorInfo()` Their values are same with "key.nameoffset" and "key.namelength" in most case. When kind is extension, their values locate **the type's declaration** in their declared file. That may be different from the file declaring extension. So, using them is wrong. Is this related to realm/jazzy#454?
@@ -978,11 +978,11 @@ | |||
}, | |||
{ | |||
"key.kind" : "source.lang.swift.decl.extension", | |||
"key.offset" : 326, | |||
"key.offset" : 1603, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think this patch does the right thing, and when running jazzy's integration specs, it now picks up type aliases that it was previously dropping: diff --git a/document_realm_swift/after/docs/Structs/SortDescriptor.html b/document_realm_swift/after/docs/Structs/SortDescriptor.html
index 4b95b91..f332936 100644
--- a/document_realm_swift/after/docs/Structs/SortDescriptor.html
+++ b/document_realm_swift/after/docs/Structs/SortDescriptor.html
@@ -438,7 +438,7 @@ engine.</p>
<section class="section">
<div class="pointer"></div>
<div class="abstract">
- <p>Creates a <code><a href="../Structs/SortDescriptor.html">SortDescriptor</a></code> from a <code>UnicodeScalarLiteralType</code>.</p>
+ <p>Creates a <code><a href="../Structs/SortDescriptor.html">SortDescriptor</a></code> from a <code><a href="../Structs/SortDescriptor.html#/s:V10RealmSwift14SortDescriptor24UnicodeScalarLiteralType">UnicodeScalarLiteralType</a></code>.</p>
</div>
<div class="declaration">
@@ -478,6 +478,66 @@ engine.</p>
<li class="item">
<div>
<code>
+ <a name="/s:V10RealmSwift14SortDescriptor24UnicodeScalarLiteralType"></a>
+ <a name="//apple_ref/swift/Alias/UnicodeScalarLiteralType" class="dashAnchor"></a>
+ <a class="token" href="#/s:V10RealmSwift14SortDescriptor24UnicodeScalarLiteralType">UnicodeScalarLiteralType</a>
+ </code>
+ </div>
+ <div class="height-container">
+ <div class="pointer-container"></div>
+ <section class="section">
+ <div class="pointer"></div>
+ <div class="abstract">
+ <p><code>StringLiteralType</code>. Required for <code>StringLiteralConvertible</code> conformance.</p>
+
+ </div>
+ <div class="declaration">
+ <h4>Declaration</h4>
+ <div class="language">
+ <p class="aside-title">Swift</p>
+ <pre class="highlight"><code><span class="kd">public</span> <span class="kd">typealias</span> <span class="kt">UnicodeScalarLiteralType</span> <span class="o">=</span> <span class="kt">StringLiteralType</span></code></pre>
+
+ </div>
+ </div>
+ <div class="slightly-smaller">
+ <a href="https://github.com/realm/realm-cocoa/tree/v1.0.0/RealmSwift-swift2.2/SortDescriptor.swift#L90">Show on GitHub</a>
+ </div>
+ </section>
+ </div>
+ </li>
+ <li class="item">
+ <div>
+ <code>
+ <a name="/s:V10RealmSwift14SortDescriptor34ExtendedGraphemeClusterLiteralType"></a>
+ <a name="//apple_ref/swift/Alias/ExtendedGraphemeClusterLiteralType" class="dashAnchor"></a>
+ <a class="token" href="#/s:V10RealmSwift14SortDescriptor34ExtendedGraphemeClusterLiteralType">ExtendedGraphemeClusterLiteralType</a>
+ </code>
+ </div>
+ <div class="height-container">
+ <div class="pointer-container"></div>
+ <section class="section">
+ <div class="pointer"></div>
+ <div class="abstract">
+ <p><code>StringLiteralType</code>. Required for <code>StringLiteralConvertible</code> conformance.</p>
+
+ </div>
+ <div class="declaration">
+ <h4>Declaration</h4>
+ <div class="language">
+ <p class="aside-title">Swift</p>
+ <pre class="highlight"><code><span class="kd">public</span> <span class="kd">typealias</span> <span class="kt">ExtendedGraphemeClusterLiteralType</span> <span class="o">=</span> <span class="kt">StringLiteralType</span></code></pre>
+
+ </div>
+ </div>
+ <div class="slightly-smaller">
+ <a href="https://github.com/realm/realm-cocoa/tree/v1.0.0/RealmSwift-swift2.2/SortDescriptor.swift#L93">Show on GitHub</a>
+ </div>
+ </section>
+ </div>
+ </li>
+ <li class="item">
+ <div>
+ <code>
<a name="/s:FV10RealmSwift14SortDescriptorcFT30extendedGraphemeClusterLiteralSS_S0_"></a>
<a name="//apple_ref/swift/Method/init(extendedGraphemeClusterLiteral:)" class="dashAnchor"></a>
<a class="token" href="#/s:FV10RealmSwift14SortDescriptorcFT30extendedGraphemeClusterLiteralSS_S0_">init(extendedGraphemeClusterLiteral:)</a>
@@ -488,7 +548,7 @@ engine.</p>
<section class="section">
<div class="pointer"></div>
<div class="abstract">
- <p>Creates a <code><a href="../Structs/SortDescriptor.html">SortDescriptor</a></code> from an <code>ExtendedGraphemeClusterLiteralType</code>.</p>
+ <p>Creates a <code><a href="../Structs/SortDescriptor.html">SortDescriptor</a></code> from an <code><a href="../Structs/SortDescriptor.html#/s:V10RealmSwift14SortDescriptor34ExtendedGraphemeClusterLiteralType">ExtendedGraphemeClusterLiteralType</a></code>.</p>
</div>
<div class="declaration"> |
I don't think this is related to realm/jazzy#454 |
Thanks @norio-nomura! |
Sorry, I have not yet read jazzy's codes. |
Their values are same with
key.nameoffset
andkey.namelength
in most case.When kind is extension, their values locate the type's declaration in their declared file.
That may be different from the file declaring extension.
So, using them is wrong.
Is this related to realm/jazzy#454?