alekratz / sbl-rs

Stack-based language (SBL) implemented in Rust.
2 stars 0 forks source link

Type detection #3

Open alekratz opened 7 years ago

alekratz commented 7 years ago

There is currently no way to determine the type of an item on top of the stack. I propose using the ? character as a built-in observer for this operation. The function shall push the name of the type (as a string) to the top of the stack when it is called.

alekratz commented 7 years ago

My brain is playing tricks on me. I'm now thinking that we shouldn't use a symbol and instead either use the keyword ty or type.

alekratz commented 7 years ago

Promoted to 'easy' because it's just a builtin function.