- Implementation of OneScript engine in JavaScript/TypeScript
- Uses tree-sitter grammar compiled to WASM for parsing
- Three main components: Parser (OneScriptParser.ts), Compiler (OneScriptCompiler.ts), Virtual Machine (OneScriptVirtualMachine.ts)
- Entry point: OneScript.ts combines all components
src/- Main source code directorytests/- Test suite using Vitestgrammar.js- Tree-sitter grammar definitionsrc/OneScriptCompiler.ts- Compiler for VMsrc/OneScriptParser.ts- Parsersrc/OneScriptVirtualMachine.ts- VM implementationsrc/OneScriptOperations.ts- List of VM operations
npm testornpm run test:run- Run all testsnpm run debug- Run debug script (debug.ts)bash ./run_test.sh- Run tests via shell script
- Tests located in
tests/all.test.ts