mirror of
https://github.com/bendtherules/not-a-js-engine.git
synced 2026-08-18 13:52:36 +00:00
13 lines
293 B
TypeScript
13 lines
293 B
TypeScript
import { Node } from './acorn-helpers/types';
|
|
|
|
class NotImplementedError extends TypeError {}
|
|
|
|
export function throwUnknownNode(node: Node) {
|
|
throw new NotImplementedError(
|
|
`Unknown type: ${node.type} with text "${node.sourceFile?.slice(
|
|
node.start,
|
|
node.end
|
|
)}"`
|
|
);
|
|
}
|