elikaski / BF-it

A C-like language to Brainfuck compiler, written in Python
MIT License
121 stars 11 forks source link

Support recursion #19

Open elikaski opened 4 years ago

elikaski commented 4 years ago

With the new design of functions, it might be possible to support recursion By compiling the function recursively, up to a certain depth, that is given at compilation time Add --recursion_depth flag to indicate the maximum depth of the recursion When hitting that depth in run-time, print an error and enter an infinite loop, similar to division by zero