radon-project / radon

The Radon Programming Language
https://radon-project.github.io
GNU General Public License v3.0
21 stars 2 forks source link

Added `help` function support for modules #166

Closed Vardan2009 closed 1 month ago

Vardan2009 commented 1 month ago

Closes #164

This adds support for printing module contents by the help(obj) function

But, I'm not sure about these lines in the code:

if (type(f).__name__ == "BuiltInClass") or (type(f).__name__ == "BuiltInFunction"): continue
if k == "null" or k == "false" or k == "true": continue
Almas-Ali commented 1 month ago

Hey, @angelcaru can you review this??

angelcaru commented 1 month ago

To avoid that funny-looking code, we could have a special method on SymbolTables like set_builtin or something and have this function look for that. Otherwise, LGTM