fn hasTrailingComment(tree: Ast, t: Ast.TokenIndex) bool
tree: Ast
t: Ast.TokenIndex
3173 3174 3175 3176 3177 3178 3179 3180 3181 3182
fn hasTrailingComment(tree: Ast, t: Ast.TokenIndex) bool { const start = tree.tokenStart(t) + tree.tokenSlice(t).len; const between = tree.source[start..tree.tokenStart(t + 1)]; for (between) |byte| switch (byte) { '\n' => return false, '/' => return true, else => continue, }; return false; }