anydemo / newlang

write programming language in rust

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

newlang-rust

An interpreter for the newlang programming language written in Rust

The newlang Programming Language

forked from monkey-rust

What’s newlang?

Monkey has a C-like syntax, supports variable bindings, prefix and infix operators, has first-class and higher-order functions, can handle closures with ease and has integers, booleans, arrays and hashes built-in.

There is a book about learning how to make an interpreter: Writing An Interpreter In Go. This is where the Monkey programming language come from.

Instruction

Build and test

$ cargo build
$ cargo test

Running the REPL

$ cargo run --release --bin newlangrepl

Running the Interpreter

$ cargo run --release --bin newlang -- --src examples/hash.mk

License

Apache

About

write programming language in rust

License:Apache License 2.0


Languages

Language:Rust 86.0%Language:C 9.8%Language:Yacc 2.1%Language:Lex 1.0%Language:Makefile 0.8%Language:NewLisp 0.3%