brainstem 0.1.0

A Brainfuck compiler and interpreter library, with a BrainStem frontend language.
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
// Factorial calculator

var n = 4;  // Calculate factorial of 4
var result = 1;
var i = 1;

// Calculate n!
while i <= n {
    result = result * i;
    i = i + 1;
}

// Output result as digit (works for small factorials)
putc("0" + result / 10);
putc("0" + result % 10);
putc(10); // newline