This commit is contained in:
Chris Wanstrath 2025-10-05 22:05:45 -07:00
parent b4e5d16da4
commit b7d9e8e55d
3 changed files with 10 additions and 2 deletions

View File

@ -4,6 +4,14 @@ globs: "*.ts, *.tsx, *.html, *.css, *.js, *.jsx, package.json"
alwaysApply: false alwaysApply: false
--- ---
## Overview
This is a stack based VM for a simple dyanmic language called Shrimp.
Please read README.md, SPEC.md, src/vm.ts, and the examples/ to understand the VM.
## Bun
Default to using Bun instead of Node.js. Default to using Bun instead of Node.js.
- Use `bun <file>` instead of `node <file>` or `ts-node <file>` - Use `bun <file>` instead of `node <file>` or `ts-node <file>`

View File

@ -1,11 +1,11 @@
; Mixed variadic and named arguments ; Mixed variadic and named arguments
; Function takes one fixed param, variadic positional, and kwargs ; Function takes one fixed param, variadic positional, and kwargs
MAKE_FUNCTION (x ...rest @kwargs) #10 MAKE_FUNCTION (x ...rest @kwargs) #10
PUSH 'name'
PUSH 'Bob'
PUSH 1 PUSH 1
PUSH 2 PUSH 2
PUSH 3 PUSH 3
PUSH 'name'
PUSH 'Bob'
PUSH 3 PUSH 3
PUSH 1 PUSH 1
CALL CALL