agsamantha/node_modules/jintr/dist/nodes/SwitchCase.js

12 lines
365 B
JavaScript
Raw Normal View History

2024-10-02 20:15:21 +00:00
import BaseJSNode from './BaseJSNode.js';
export default class SwitchCase extends BaseJSNode {
run() {
for (const stmt of this.node.consequent) {
const result = this.visitor.visitNode(stmt);
if (stmt.type === 'ContinueStatement' || stmt.type === 'BreakStatement') {
return result;
}
}
}
}