[swift-dev] Looking for documentation/insight on .swiftdoc
George King
gwk.lists at gmail.com
Wed Oct 25 10:02:34 CDT 2017
Thanks for the pointers. Doug, I take it from your initial comment that there is no matching “readDocFromStream”? (I don’t see one in Deserialization.cpp). If not, then what consumes the swiftdoc files?
> On Oct 24, 2017, at 6:09 PM, Douglas Gregor <dgregor at apple.com> wrote:
>
>
>
>> On Oct 24, 2017, at 3:05 PM, Robert Widmann <devteam.codafi at gmail.com> wrote:
>>
>> Or libSyntax!
>
> If it doesn’t do comments yet… it certainly should!
>
> - Doug
>
>>
>> ~Robert Widmann
>>
>>> On Oct 24, 2017, at 4:06 PM, Douglas Gregor via swift-dev <swift-dev at swift.org> wrote:
>>>
>>>
>>>
>>>> On Oct 23, 2017, at 11:27 AM, George King via swift-dev <swift-dev at swift.org> wrote:
>>>>
>>>> Hello, I’m curious about the swiftdoc format. I’ve looked through the swift codebase and have been unable to find either documentation about it or the relevant source code. Could somebody point me in the right direction? I’m thinking about building a swift documentation viewer and want to figure out if I would have to extract docs from source by hand, or if I can leverage the compiler in some way to do the parsing and document syntax rendering.
>>>
>>>
>>> It’s a serialized format, emitted by Serialization::writeDocToStream(), here:
>>>
>>> https://github.com/apple/swift/blob/master/lib/Serialization/Serialization.cpp#L4656-L4678
>>>
>>> It would be a pain to write another client to read the binary format. Better would be to use SourceKit to walk the compiler’s AST and ask for the documentation for the various declarations.
>>>
>>> - Doug
>>>
>>> _______________________________________________
>>> swift-dev mailing list
>>> swift-dev at swift.org
>>> https://lists.swift.org/mailman/listinfo/swift-dev
>>
>
More information about the swift-dev
mailing list