UNPKG

yaml-unist-parser

Version:

A YAML parser that produces output compatible with unist

12 lines (10 loc) 340 B
import { tokens } from "../cst.mjs"; //#region src/utils/extract-comments.ts function extractComments(tokens$1, context) { const restNodes = []; for (const token of tokens(tokens$1)) if (token.type === "comment") context.transformComment(token); else restNodes.push(token); return restNodes; } //#endregion export { extractComments };