repositorypackage
0.0.0-20240817060826-186c40ab6d84
Repository: https://github.com/cmp5au/monkey-extended.git
Documentation: pkg.go.dev
# Packages
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
# README
monkey-extended

Usage
go install github.com/cmp5au/monkey-extended@latest
$(go env GOPATH)/bin/monkey-extended <options>
Options
- monkey-extended [(-e | --engine) ]
- start REPL using the desired engine ("vm" or "evaluator")
- monkey-extended [(-e | --engine) ] [(-o | --out) ]
- evaluate the input monkeyfile using the engine of choice
- if -o,--out option is provided, engine must be "vm"
- if file extension is not .koko, this option is the default unless additional flags are provided
- monkey-extended [-k | --koko]
- interpret the koko bytecode and run the program within
- if file extension is .koko, this option is the default unless additional flags are provided
Added Behavior
for
loopsbreak
andcontinue
control flow statements
- variable declaration without assignment (ex:
let x;
) - variable assignment without
let
for declared variables (ex:x = 1;
) - deque methods for Array type:
push
,pop
,pushleft
,popleft
delete
builtin for removal from Array or Hash types- String operators: concatenation with +, comparators (==, !=, <, >, <=, >=), indexing
null
literal- bytecode (de)serialization
- support for running Monkey scripts
- support for "less/greater than or equal to" operators <=, >=
- compiler bugfixes in cases where last statement is not an ExpressionStatement