(path, options /* , print*/)
| 8 | import { shouldExpressionStatementPrintLeadingSemicolon } from "../semicolon/semicolon.js"; |
| 9 | |
| 10 | function printIgnored(path, options /* , print*/) { |
| 11 | const { node } = path; |
| 12 | let text = options.originalText.slice(locStart(node), locEnd(node)); |
| 13 | |
| 14 | if (options.semi && shouldIgnoredNodePrintSemicolon(node)) { |
| 15 | text += ";"; |
| 16 | } else if (shouldExpressionStatementPrintLeadingSemicolon(path, options)) { |
| 17 | text = `;${text}`; |
| 18 | } |
| 19 | |
| 20 | if (node.type === "ClassExpression" && isNonEmptyArray(node.decorators)) { |
| 21 | return [indent([softline, text]), softline]; |
| 22 | } |
| 23 | |
| 24 | return text; |
| 25 | } |
| 26 | |
| 27 | export { printIgnored }; |
no test coverage detected
searching dependent graphs…