Giter VIP home page Giter VIP logo

Comments (5)

jpsim avatar jpsim commented on August 18, 2024

Very interesting find. How are you parsing the resulting binary?

from jazzy.

jeremy-w avatar jeremy-w commented on August 18, 2024

@jpsim I just ran vi on it and skimmed for recognizable strings in the soup of binary. My guess is there's additional info about the types added automatically. I haven't had time to dig into trying to reverse the binary format. It's likely Xcode knows how to parse it already, so pointing Hopper at Xcode would be another route for getting hints into the swiftdoc binary structure.

from jazzy.

jpsim avatar jpsim commented on August 18, 2024

Ah yes, popped it into a hex editor. Looks like it contains mostly what we already have by running xcrun swift-ide-test -print-comments. Here's a gist showing the structured XML output we get from that.

It would still be useful to support generating docs for pre-compiled .swiftdoc files. So I'll keep this issue open, but that won't be a high priority just yet. Focusing on generating docs from source code first.

from jazzy.

beltex avatar beltex commented on August 18, 2024

reST indeed. From the Xcode release notes:

"Swift recognizes comments that start with the special marker /** or /// as documentation comments. Swift uses reStructuredText, an easy-to-read, modern lightweight markup language in documentation comments. Currently only block-level markup is supported (nested bullet and enumerated lists, field lists). In order to document function and method parameters, use :param: followed by parameter name, and to document return values use :returns:"

Also see - http://nshipster.com/swift-documentation/

from jazzy.

jpsim avatar jpsim commented on August 18, 2024

I looked into the .swiftdoc format, and unfortunately it doesn't have enough information to build comprehensive docs, so I'm closing this for now. We can re-open if Apple adds more information in this file.

from jazzy.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.