![]() |
Spicy
|
#include <doc-string.h>
Public Member Functions | |
const auto & | summary () const |
const auto & | text () const |
void | addSummary (const std::string &line) |
void | addText (const std::string &line) |
void | render (std::ostream &out) const |
void | render (printer::Stream &out) const |
operator bool () const | |
Represents an AST node's documentation string.
|
inline |
Appends a line of summary text to the documentation.
line | line to add, with optional comment prefix (which will be removed) |
|
inline |
Appends a line of documentation text to the documentation.
line | line to add, with optional comment prefix (which will be removed) |
|
inlineexplicit |
Returns true if any summary or documentation text has been added.
void DocString::render | ( | std::ostream & | out | ) | const |
Renders the comment back into a multi-line string. This is primarily for debugging.
void DocString::render | ( | printer::Stream & | out | ) | const |
Renders the comment back into a code representation through our code printer.
|
inline |
Returns all lines of summary text added so far. The returned lines will have their comment prefixes stripped.
|
inline |
Returns all lines of documentation text added so far. The returned lines will have their comment prefixes stripped.