UNPKG

jintr

Version:

A tiny JavaScript interpreter written in TypeScript.

12 lines (11 loc) 365 B
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; } } } }