ngs-lang / ngs

Next Generation Shell (NGS)
https://ngs-lang.org/
GNU General Public License v3.0
1.44k stars 41 forks source link

ns::f should only list f methods defined in the namespace? #122

Open ilyash-b opened 6 years ago

ilyash-b commented 6 years ago

If f is a global multimethod and it was declared global in a namespace, should ns::f only list f methods defined in the namespace or all methods?

ilyash-b commented 6 years ago

Suggestion: global methods should not be even listed in the namespace. Warning: if doing this change, make sure the documentation generation is updated accordingly.

Plan: move ns syntax construct processing from syntax.leg into compile.c, which knows which variables are local and which are not. Only generate _exports['...']= statements for local variables.