summaryrefslogtreecommitdiff
path: root/examples/fib.int
diff options
context:
space:
mode:
authorTom Harley2019-10-12 02:41:50 +0100
committerTom Harley2019-10-12 02:41:50 +0100
commit417c0addcafe8bfd3d9305ab7d2fac207ad54700 (patch)
treef22954d08cdc910f4a2016323498f36a9b165a64 /examples/fib.int
parentImplement function definitions (diff)
downloadsinter-417c0addcafe8bfd3d9305ab7d2fac207ad54700.tar.gz
sinter-417c0addcafe8bfd3d9305ab7d2fac207ad54700.zip

Implement recursive definition support

Enables definition of a recursive function through defining a base case using an if statement. Previously, doing this would produce compilable code, but running the product executable would cause a stack overflow, since the executable would attempt to evaluate both sides of the branch.

Making the if statement a built-in part of the language is a bit crude, but is simple and works. Maybe, if time allows, this will be revisited.

Diffstat (limited to 'examples/fib.int')
0 files changed, 0 insertions, 0 deletions