(node)
| 52 | const shouldAddContentEnd = createTypeCheckFunction(nodeTypesWithContentEnd); |
| 53 | |
| 54 | const shouldIgnoredNodePrintSemicolon = (node) => { |
| 55 | if (shouldAddContentEnd(node) && node.__contentEnd) { |
| 56 | return true; |
| 57 | } |
| 58 | |
| 59 | const { type } = node; |
| 60 | |
| 61 | if ( |
| 62 | type === "BreakStatement" || |
| 63 | type === "ContinueStatement" || |
| 64 | type === "DebuggerStatement" || |
| 65 | type === "VariableDeclaration" |
| 66 | ) { |
| 67 | return true; |
| 68 | } |
| 69 | |
| 70 | if (type === "IfStatement") { |
| 71 | return shouldIgnoredNodePrintSemicolon(node.alternate ?? node.consequent); |
| 72 | } |
| 73 | |
| 74 | if ( |
| 75 | type === "ForInStatement" || |
| 76 | type === "ForOfStatement" || |
| 77 | type === "ForStatement" || |
| 78 | type === "LabeledStatement" || |
| 79 | type === "WithStatement" || |
| 80 | type === "WhileStatement" |
| 81 | ) { |
| 82 | return shouldIgnoredNodePrintSemicolon(node.body); |
| 83 | } |
| 84 | |
| 85 | return false; |
| 86 | }; |
| 87 | |
| 88 | /** |
| 89 | @param {Node | Comment} node |
no outgoing calls
no test coverage detected
searching dependent graphs…