ZumP Compiler

raw JSON →
1.0.13 verified Fri May 01 auth: no javascript

The official compiler for ZumP, a programming language. This package compiles ZumP source code into executable output. Version 1.0.13 targets Node.js 18+. It is a specialized tool for ZumP development with limited public adoption and documentation.

error Error [ERR_REQUIRE_ESM]: require() of ES Module /path/to/node_modules/zump-compiler/index.js from /path/to/project/index.js not supported.
cause Package is ESM-only but users try to require() it from a CommonJS module.
fix
Use import() dynamic import or convert project to ESM.
error TypeError: compile is not a function
cause Incorrect import (e.g., default import instead of named).
fix
Use import { compile } from 'zump-compiler'.
breaking Package is ESM-only (no CommonJS support). Requires Node >= 18 and "type": "module" in package.json or .mjs extension.
fix Use ESM imports; add "type": "module" to your package.json or rename files to .mjs.
gotcha No README or documentation available; API surface is inferred from package exports.
fix Refer to source code or contact maintainer for usage details.
deprecated Options object may change without major version bump due to pre-1.0 status (semver considered unstable).
fix Lock version to avoid breaking changes.
npm install zump-compiler
yarn add zump-compiler
pnpm add zump-compiler

Compiles a ZumP source file to JavaScript using the compile function, with an options object for target configuration.

import { compile } from 'zump-compiler';
import { readFileSync } from 'fs';

const source = readFileSync('example.zump', 'utf8');
try {
  const result = compile(source, { target: 'es2020' });
  console.log(result.code);
} catch (err) {
  console.error('Compilation failed:', err.message);
}