theandrew168 / derzforth

Bare-metal Forth implementation for RISC-V
MIT License
42 stars 5 forks source link

Handle the F_HIDDEN flag when defining a new word #15

Closed aw closed 2 years ago

aw commented 2 years ago

Hi,

This PR adds the ability to hide a word while it's being defined in body_colon. It also skips the word in lookup if it has the F_HIDDEN flag set to 1, and it clears the flag in body_semi.

If you can step through the program with GDB you should be able to inspect the register with the word hash while defining a word in order to verify if the hidden bit is truly set to 1.