Or libSyntax!

~Robert Widmann

> On Oct 24, 2017, at 4:06 PM, Douglas Gregor via swift-dev 
> <swift-dev@swift.org> wrote:
> 
> 
> 
>> On Oct 23, 2017, at 11:27 AM, George King via swift-dev 
>> <swift-dev@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@swift.org
> https://lists.swift.org/mailman/listinfo/swift-dev

_______________________________________________
swift-dev mailing list
swift-dev@swift.org
https://lists.swift.org/mailman/listinfo/swift-dev

Reply via email to