https://github.com/posandu/interpreter-rust
Interpreter written in Rust to learn it
https://github.com/posandu/interpreter-rust
Last synced: 3 months ago
JSON representation
Interpreter written in Rust to learn it
- Host: GitHub
- URL: https://github.com/posandu/interpreter-rust
- Owner: Posandu
- License: apache-2.0
- Created: 2022-08-27T09:28:55.000Z (over 2 years ago)
- Default Branch: main
- Last Pushed: 2022-08-27T09:29:32.000Z (over 2 years ago)
- Last Synced: 2025-02-26T04:54:20.360Z (3 months ago)
- Language: Rust
- Size: 6.84 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: readme.md
- License: LICENSE
Awesome Lists containing this project
README
# Simple interpreter written in Rust
I made this interpreter to learn Rust.
## Docs
```js
stack=[] // Stack looks like thisp(value) -> push value to stack // ex: p(1) -> stack=[1]
o() -> pop value from stack // ex: o() -> stack=[]
s() -> print stack
s(index) -> print stack[index]
o(index) -> pop value from stack[index]
```