Registry / serialization / prism-lang

prism-lang

JSON →
library0.1.6jsnpmunverified

Prism is a small, expressive programming language that transpiles to TypeScript or JavaScript. Current stable version is 0.1.6, released as a work-in-progress. It supports typed variables, functions, classes, pattern matching, and error handling. Differentiator: designed as an alternative language that compiles to JS/TS with modern syntax features. Active development with CLI tools for compile, run, and check.

npm install prism-lang
INSTALL
IMPORT
SIG · PRISM-LANG
P
prism-lang
serializationjavascriptv0.1.6
harness data pending
Install & Compatibility
Where this runs

No compatibility data collected yet for this library.

Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

compile
import { compile } from 'prism-lang'
const compile = require('prism-lang')
ESM-only; the package exports functions for programmatic use.
run
import { run } from 'prism-lang'
import * as prism from 'prism-lang'; prism.run(...)
Named export, not default.
check
import { check } from 'prism-lang'
import { check } from 'prism-lang/check'
Main entry point; no subpath exports.

Shows basic Prism syntax: immutable/mutable variables, function with type annotations, and output.

// compile.prism final name: string = "Prism" mut count: int = 0 fn greet(name: string): string { return "Hello, " + name } print(greet("World")) // CLI: prism compile file.prism --js
prism --version
Debug
Known issues
gotchaPrism is a work in progress; syntax may change without major version bump.
fix
Pin to a specific version and monitor releases for breaking changes.
affects: >=0.1.0
gotchaType inference is limited; explicit type annotations may be required in complex expressions.
fix
Add explicit type annotations when inference fails.
affects: >=0.1.0
gotchaCLI requires `npm link` or global install; otherwise commands may not be found.
fix
Run `npm install -g prism-lang` or use `npx prism compile`.
affects: >=0.1.0
Errors
Common errors & fixes
Error: Cannot find module 'prism-lang'
Package not installed or not in node_modules.
fix
Run `npm install prism-lang`.
prism: command not found
CLI binary not in PATH.
fix
Install globally: `npm install -g prism-lang`
SyntaxError: Unexpected token 'pub'
Using Prism-specific syntax in JavaScript/TypeScript.
fix
Compile .prism files with the prism CLI before using.
Upgrade
Version history
0.1.6latest on npm
Audit
Dependencies

No dependency data recorded yet.

Agent activity
2 hits · last 30 days
node
2
Resources
prism-lang — npm install prism-lang · libregistry