A lightweight JavaScript interpreter written in C# that parses and evaluates JavaScript code using an S-expression intermediate representation.
All documentation is organized in the docs/ folder. This is the main entry point for all documentation.
- Quick Start Guide - Installation, basic usage, and first steps
- API Reference - Complete API documentation
- Supported Features - Comprehensive list of all implemented JavaScript features with examples
- NPM Package Compatibility - Running npm packages with the engine
- Architecture Overview - System design, components, and design decisions
- Transformation Pipeline - How JavaScript code transforms through the pipeline (JS → S-Expr → CPS)
- Documentation Index - Complete documentation index with all implementation details
- CPS Transformation Plan - Async/await implementation strategy
- ASI Implementation - Automatic Semicolon Insertion
- Signal Pattern - Control flow signal pattern
- Control Flow Alternatives - Alternative approaches for control flow
- Investigations - Investigation notes and debugging documentation
- Key investigations: Parser vs CPS analysis, promise rejection investigation, exception channel results
- Feature Status - Current implementation status
- Completed Features - Catalog of implemented features
- Remaining Tasks - What's left to implement
Asynkron.JsEngine targets ECMAScript 262 with full language coverage and a steadily growing built-in library.
- ECMAScript 262 language: 100% compliant; all language-focused Test262 cases pass.
- Built-ins / standard library: ~50% compliant; about half of the ES built-ins are implemented on the attribute-driven generator model and the rest are being migrated. See
docs/FEATURE_STATUS_SUMMARY.mdfor the latest coverage.
- Variables, functions, classes, objects, arrays
- Async/await, Promises, generators
- ES modules (import/export) including dynamic imports
- Template literals, destructuring, spread/rest, operators, and control flow
- Implemented built-ins include Object, Array/TypedArray/ArrayBuffer/SharedArrayBuffer/DataView, Promise, Math, Date, JSON, RegExp, Reflect, Console, Symbol, Map/Set/WeakMap/WeakSet, BigInt, and async iteration helpers. Standard library coverage is expanding as more types move onto the generated constructor/prototype surface.
See Complete Feature List for detailed documentation with examples.
Console application demos are included in the examples folder:
cd examples/Demo
dotnet runThe main demo showcases basic features including variables, functions, closures, objects, arrays, control flow, operators, and standard library usage.
cd examples/PromiseDemo
dotnet runDemonstrates setTimeout, setInterval, Promise creation, chaining, error handling, and event queue processing.
cd examples/NpmPackageDemo
dotnet runShows that the engine can run pure JavaScript npm packages without Node.js dependencies.
cd examples/SExpressionDemo
dotnet runDisplays the S-expression representation and CPS transformation of JavaScript code. See Transformation Pipeline for details.
# Build the solution
dotnet build
# Run tests
cd tests/Asynkron.JsEngine.Tests
dotnet testContributions are welcome! Please feel free to submit a Pull Request.
See LICENSE file for details.
Developed by Asynkron