CrudeLang is a learning project aiming to increase my knowledge of parsers and interpreters. I've previously implemented a minimalistic Lisp; therefore I thought it would be challenging to make an imperative interpreter. masak volunteered to make a specification for CrudeLang.
npm install
npm run build
./repl
> 3 + 3;
6
> 2 + 2 == 5;
false
> "Hello, " + "World!";
Hello, World!
> let name = "Tux";
undefined
> name;
Tux
> map(inc, [1, 2, 3]);
[ 2, 3, 4 ]
> foldl(add, 0, [1, 2, 3, 4, 5]);
15
> filter(isOdd, [1, 2, 3, 4, 5]);
[ 1, 3, 5 ]
> define appendBang(str) { return str + "!"; }
undefined
> appendBang("Hi");
Hi!
./crude examples/fibonacci.crude
./crude examples/factorial.crude
./crude examples/bubble-sort.crude
./crude examples/selection-sort.crude
./crude examples/game-of-life.crude