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 #12

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 should clear the flag in body_semi however...

I've tried to handle the F_HIDDEN flag similarly to sectorforth and jonesforth but I can't seem to figure out how to clear the flag once it's set.

I was hoping you could help debug the # remove the hidden flag section of body_semi, so I opened the PR a bit prematurely.

Thanks

aw commented 2 years ago

OK I think I fixed it in commit 044e103 - I was trying to load the word from HERE but it was actually LATEST.

This seems to work now.

aw commented 2 years ago

hmmm.. this PR is not clean, I will rebase in another branch and re-submit a new PR.