Documentation generator for C++
theangryepicbanana (1603)

This is a program that generates doc comments for C++ code! I originally made this for my CS class since we have to include documentation for functions we make. It's not 100% perfect, but it definitely helps save a lot of time.

Also if you're wondering, I made this program in Raku (aka Perl 6).

1) Paste your C++ code into in.txt.
2) Run the program.
3) Copy the code in out.txt (which is the output).

If you have any suggestions (minus cleaning up my code because I know it's ugly/messy), just let me know down in the comments.

Update 1:

  • Compound numeric types are now supported.

Update 2:

  • Templates are now supported.
  • Destructors are now supported.
  • Operator overloads are now supported.
  • Fixed a bug.
You are viewing a single comment. View All
StudentFires (327)

@theangryepicbanana I tried to transpile C++ to JavaScript using a "super fancy regex" once. Unexpectedly, I gave up before I got too far. Also, I was too late anyway, they'd already make asm.js and emscripten. Regexing isn't the best way to do things.

It'd help to have syntax highlighting though:
Use open "out.cpp" and slurp("in.cpp").lines

The script can be modified to accept .cpp or .cc and output the input file's type, as opposed to a simple .txt file.