* Ends the code path for the current node. * @returns {void}
()
| 674 | * @returns {void} |
| 675 | */ |
| 676 | function endCodePath() { |
| 677 | let codePath = analyzer.codePath; |
| 678 | |
| 679 | // Mark the current path as the final node. |
| 680 | CodePath.getState(codePath).makeFinal(); |
| 681 | |
| 682 | // Emits onCodePathSegmentEnd event of the current segments. |
| 683 | leaveFromCurrentSegment(analyzer, node); |
| 684 | |
| 685 | // Emits onCodePathEnd event of this code path. |
| 686 | debug.dump(`onCodePathEnd ${codePath.id}`); |
| 687 | analyzer.emit("onCodePathEnd", [codePath, node]); |
| 688 | debug.dumpDot(codePath); |
| 689 | |
| 690 | codePath = analyzer.codePath = analyzer.codePath.upper; |
| 691 | if (codePath) { |
| 692 | debug.dumpState(node, CodePath.getState(codePath), true); |
| 693 | } |
| 694 | } |
| 695 | |
| 696 | switch (node.type) { |
| 697 | case "Program": |
no test coverage detected
searching dependent graphs…