misalcedo / tortuga

A CGI and WCGI server for HTTP/1.1
Apache License 2.0
7 stars 0 forks source link

Functions should lose their binding #70

Closed misalcedo closed 2 years ago

misalcedo commented 2 years ago

Currently the binding makes it so a function cannot reference any functions defined after it's declaration. That's why I needed to override the function to support factorial. Only the old factorial definition existed.

A better implementation is to do multiple passes to determine the names at leach scope level.

misalcedo commented 2 years ago

Just use the given environment and remove the binding field.

misalcedo commented 2 years ago

Can't just remove the binding because without a stack, the nested and recursive calls fail.

stale[bot] commented 2 years ago

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

stale[bot] commented 2 years ago

This issue has been automatically closed because it has not had recent activity. You may re-open the issue if it is still relevant.