dparse.trivia
Module to work with trivia tokens (comment, whitespace, specialTokenSequence) which are attached to tokens near them when source code gets tokenized.
enum CommentType
struct MultiLineCommentHelper
Types 2
enumCommentType : ubyte
none
docLine
docBlock
normalLine
normalBlock
Gives a line per line view on DDOC comments of type `/++` and `/**` which makes easier to remove the decoration and in an almost 100% nogc way.
Fields
char[][] linessize_t lastLineInBlockPlusOneconst(char) commentCharubyte firstLineInBlockFunctions 6
fn
void unDecorateComment(T)(string comment, auto ref T outputRange) if (isOutputRange!(T, string))Removes "decoration" such as leading whitespace, leading + and * characters, and places the result into the given output rangefn
string extractDdocFromTrivia(Tokens)(Tokens tokens) if (isInputRange!Tokens && (is(ElementType!Tokens : Token) || is(ElementType!Tokens : TriviaToken))) pure nothrow @safeExtracts and combines ddoc comments from trivia comments.