ts-budgie
Version:
Converts TypeScript code to Budgie.
17 lines • 803 B
JavaScript
;
Object.defineProperty(exports, "__esModule", { value: true });
var budgie_1 = require("budgie");
var budgieLine_1 = require("../output/budgieLine");
var transformation_1 = require("../output/transformation");
var parseCommentText = function (commentText) {
if (commentText.substring(0, "//".length) === "//") {
return parseCommentText(commentText.substring("//".length));
}
return commentText.trim();
};
exports.visitSingleLineCommentTrivia = function (fullText, comment) { return [
transformation_1.Transformation.fromCommentRange(comment, [
new budgieLine_1.BudgieLine(budgie_1.CommandNames.CommentLine, parseCommentText(fullText.substring(comment.pos, comment.end))),
]),
]; };
//# sourceMappingURL=visitSingleLineCommentTrivia.js.map