Skip to content

ripta/mwnci

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

mwnci: an implementation of the Monkey programming language, which is designed by Thorsten Ball

To install:

go install github.com/ripta/mwnci/cmd/mwnci@latest

To run REPL, just invoke mwnci; the REPL does not support multiline input, e.g., function definitions have to be compressed into one line. The evaluation result for each line is printed.

To run a file, pass it one or more files, e.g.:

❯ mwnci examples/math.mwn
46

When running in file mode, per-line results are suppressed. Multiple files are run in separate environments; no sharing across source files yet.

Some differences compared to the reference implementation:

  • file mode in addition to REPL mode
  • multibyte runes
  • 64-bit floats
  • line numbers in errors (incomplete)