![]() |
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 | print (std::ostream &out) const |
| void | print (hilti::printer::Stream &out) const |
| std::string | dump () 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) |
| std::string DocString::dump | ( | ) | const |
Returns a string representation of the full documentation string.
|
inlineexplicit |
Returns true if any summary or documentation text has been added.
| void DocString::print | ( | hilti::printer::Stream & | out | ) | const |
Renders the comment back into a code representation through our code printer.
| void DocString::print | ( | std::ostream & | out | ) | const |
Renders the comment back into a multi-line string. This is primarily for debugging.
|
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.