![]() Server : Apache System : Linux server2.corals.io 4.18.0-348.2.1.el8_5.x86_64 #1 SMP Mon Nov 15 09:17:08 EST 2021 x86_64 User : corals ( 1002) PHP Version : 7.4.33 Disable Function : exec,passthru,shell_exec,system Directory : /home/corals/dceprojects.corals.io/node_modules/@babel/traverse/lib/path/ |
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.addComment = addComment; exports.addComments = addComments; exports.shareCommentsWithSiblings = shareCommentsWithSiblings; var _t = require("@babel/types"); const { addComment: _addComment, addComments: _addComments } = _t; function shareCommentsWithSiblings() { if (typeof this.key === "string") return; const node = this.node; if (!node) return; const trailing = node.trailingComments; const leading = node.leadingComments; if (!trailing && !leading) return; const prev = this.getSibling(this.key - 1); const next = this.getSibling(this.key + 1); const hasPrev = Boolean(prev.node); const hasNext = Boolean(next.node); if (hasPrev && !hasNext) { prev.addComments("trailing", trailing); } else if (hasNext && !hasPrev) { next.addComments("leading", leading); } } function addComment(type, content, line) { _addComment(this.node, type, content, line); } function addComments(type, comments) { _addComments(this.node, type, comments); }