zxul767 / lox

An interpreter for the Lox language
1 stars 0 forks source link

document `help` function in `jlox` REPL #25

Open zxul767 opened 1 year ago

zxul767 commented 1 year ago

there is now a handy function help which can be passed any value and it will print whatever help is available. for example:

>>> help(sin)
{ sin(n:number) -> number } : <built-in function>

>>> help("hello".starts_with)
{ starts_with(prefix:str) -> bool } : <built-in method>

we should advertise it in the initial help banner of the REPL as well as in the READMEs