API Reference
XPR is available for JavaScript, Python, and Go. All runtimes share the same expression language and pass the same conformance test suite.
Runtimes
| Runtime | Package | Status |
|---|---|---|
| JavaScript / TypeScript | @xpr-lang/xpr | ✅ Available |
| Python | xpr-lang | ✅ Available |
| Go | github.com/xpr-lang/xpr-go | ✅ Available |
Common API Shape
All runtimes expose the same conceptual API:
engine = new Engine()
result = engine.evaluate(expression, context)
engine.addFunction(name, fn)The method names follow each language's conventions (evaluate / Evaluate, addFunction / add_function / AddFunction).
Conformance
All runtimes pass the same conformance test suite — covering literals, arithmetic, comparison, logic, collections, strings, functions, access patterns, pipe operator, let bindings, spread operator, and all v0.5 features.