A sandboxed expression language with JS/Python-familiar syntax, designed for data pipeline transforms.
| Repo | Description |
|---|---|
| xpr-lang/xpr | Language specification and conformance tests (this repo) |
| xpr-lang/xpr-js | JavaScript/TypeScript runtime |
| xpr-lang/xpr-python | Python runtime |
| xpr-lang/xpr-go | Go runtime |
| xpr-lang/xpr-docs | Documentation site |
| xpr-lang/xpr-playground | Interactive playground |
See XPR-SPEC.md for the complete language specification.
The conformance/ directory contains YAML test files organized by category:
access.yaml— Property access, optional chainingarithmetic.yaml— Arithmetic operators, precedence, associativitycollections.yaml— Array collection methods (v0.1)collections_v5.yaml— New array methods (v0.5): sortBy, take, drop, sum, avg, etc.comparison.yaml— Equality and comparison operatorsdatetime.yaml— Date/time functions (v0.3)destructuring.yaml— Object and array destructuring (v0.4)examples.yaml— End-to-end integration examplesfeatures_v5.yaml— v0.5 features: math, type predicates, fromEntries, rest paramsfunctions.yaml— Built-in functions, custom functions, arrow functionslet.yaml— Let bindings, scoping, shadowing, closuresliterals.yaml— Number, string, boolean, null, array, object, template literalslogic.yaml— Logical operators, ternary, nullish coalescingmath_v5.yaml— Math functions and constants (v0.5)methods_v2.yaml— v0.2 array, string, object methods and range()negative_indexing.yaml— Negative array indexing (v0.3)pipe.yaml— Pipe operatorregex.yaml— Regex functions (v0.3): matches, match, matchAll, replacePatternregex_literals.yaml— Regex literal syntax and regex type (v0.4)spread.yaml— Array and object spread operatorstrings.yaml— String methodstype_predicates.yaml— Type predicate functions (v0.5)
See conformance/SCHEMA.md for the test format specification.
Add this repo as a git submodule:
git submodule add https://github.com/xpr-lang/xpr.git conformanceThen read all *.yaml files from the conformance/ directory in your test runner.
MIT