tokenSliceForRender
Function parameters
Parameters
Type definitions in this namespace
Types
Functions in this namespace
Functions
Error sets in this namespace
Error Sets
Source
Implementation
fn tokenSliceForRender(tree: Ast, token_index: Ast.TokenIndex) []const u8 {
var ret = tree.tokenSlice(token_index);
switch (tree.tokenTag(token_index)) {
.container_doc_comment, .doc_comment => {
ret = mem.trimEnd(u8, ret, &std.ascii.whitespace);
},
else => {},
}
return ret;
}