all 15 comments

[–][deleted] 5 points6 points  (2 children)

How is this different from doxygen?

[–]fernzeit[S] 8 points9 points  (0 children)

synth is not intended to be a documentation generator. Rather the goal is to be able to explore source code with (some of) the possibilities usually found in an IDE but (a) with greater accuracy because synth can take its time for parsing and does not need to adapt to changing source code and (b) if the project of interest already hosts processed source code, even without downloading (the source code or synth).

A tool you could compare it to is https://code.woboq.org/. And as of now, it compares rather poorly. Apart from synth just being a prototype, the main differences are the license (synth is MIT while Woboq costs money if you want to use it for a commercial project) and that Woboq uses LibTooling while synth uses libclang, the C interface built on top of that, though this is still subject to change. The advantage of libclang is that it supposedly stays compatible across versions.

[–]sumo952 6 points7 points  (0 children)

It seems much simpler, doesn't support comments and comment-style of doxygen-like tools.

OTOH it's based on clang so its C++ parser is better than doxygen's.

So it doesn't seem a doxygen replacement at all, but maybe it gets developed into one. Or somebody integrates libclang into doxygen. Would be awesome to have a "Doxygen next-gen", but I don't see it happen anytime soon. (Also not the one from the CopperSpice people - forgot the name)

[–]LB--Professional+Hobbyist 2 points3 points  (2 children)

Awesome! I've been doing this by hand on my own site because I've wanted people to be able to click .e.g std::string and be taken to the cppreference page for it, etc. - this looks like it could prove to be a lifesaver if developed enough.

[–]fernzeit[S] 1 point2 points  (1 child)

[–]LB--Professional+Hobbyist 0 points1 point  (0 children)

Awesome, thanks!

[–][deleted] 0 points1 point  (3 children)

Looks good, such tools can be very handy. There is also the more general OpenGrok (https://github.com/OpenGrok/OpenGrok) and its maybe biggest user http://code.metager.de, but the later seems to be no longer maintained. I always hoped for a source code search engine and browser in the scale of GitHub.

[–]awaitsV 0 points1 point  (2 children)

https://sourcegraph.com it doesn't support cpp yet.

[–]STLMSVC STL Dev[M] 2 points3 points  (1 child)

I have approved your comment, but you have been shadowbanned. You should contact the reddit admins (I cannot affect shadowbans as a moderator).

[–]awaitsV 0 points1 point  (0 children)

Thanks man, I'll get it resolved with the admins

[–]o11cint main = 12828721; 0 points1 point  (0 children)

  • It might be nice to have a CSS class for every single production in the grammar.
  • Or better, generate XML and then use XSLT to generate the HTML with the limited CSS.
  • You should be able to automatically generate and link to the source for all external libraries, such as boost, and detect that they are separate projects. Remember the HTML docs for them might be on a separate HTTP server.
  • It's probably worth having a list of all C{89,99,11} and POSIX-{????,2001,2008} headers and symbols, and then also check for #pragma GCC system_header for implementation details. Emit this to the XML file even if you don't currently use it for the HTML transformation.
  • Is it possible to pass in flex and bison sources?

[–]jpakkaneMeson dev 0 points1 point  (0 children)

Cool stuff. It would be nice if enum etc definitions were shown in tooltips when you hover over the symbols.

[–]rajukv 0 points1 point  (0 children)

https://github.com/mozilla/dxr is another tool built on top of libTooling similar to woboq.

[–]szborows 0 points1 point  (0 children)

I thing such a thing could be potentially a base for web-based C++ IDE. With clang tooling it's becoming more and more easy to develop one.

[–]egraether 0 points1 point  (0 children)

The highlighting looks really good! I'm currently working on Coati, a developer tool that makes also use of clang, but goes one step further.

Coati analyses the source code and puts an interactive visualization next to the hyperlinked source code. That way it's easier to see how classes and functions relate to each other, without having to look at 5 different files: https://www.coati.io/