corth-lang / Corth

A self-hosted stack based language like Forth
MIT License
7 stars 1 forks source link

Directory including #16

Open HuseyinSimsek7904 opened 9 months ago

HuseyinSimsek7904 commented 9 months ago

The compiler should allow directory including.

There are basically two approaches to this: recursion and tree traversal.

Solving this issue with recursion requires the promise keyword since we will need two different procedures calling each other causing cycle dependencies.

Using tree traversal algorithm on the other hand does not require a completely new feature to the language. However, this still requires the implementation of a stack for include files which may cause a large change in the system.

Because of these, it may not be worth it to work on this issue right now.