|
|
|
@ -24,7 +24,7 @@ static enum fh_error w_colon(struct fh_thread_s *fh, const struct fh_word_s *w) |
|
|
|
|
new_word->handler = w_user_word; |
|
|
|
|
strncpy(new_word->name, wordname, namelen); |
|
|
|
|
new_word->name[namelen] = 0; |
|
|
|
|
new_word->flags = WORDFLAG_WORD; |
|
|
|
|
new_word->flags = WORDFLAG_WORD | WORDFLAG_HIDDEN; |
|
|
|
|
|
|
|
|
|
fh->dict_last = ptr; |
|
|
|
|
|
|
|
|
@ -50,7 +50,7 @@ static enum fh_error w_colon_noname(struct fh_thread_s *fh, const struct fh_word |
|
|
|
|
new_word->param = fh->here; |
|
|
|
|
new_word->handler = w_user_word; |
|
|
|
|
new_word->name[0] = 0; |
|
|
|
|
new_word->flags = WORDFLAG_WORD; |
|
|
|
|
new_word->flags = WORDFLAG_WORD; // noname word exists outside the dict, so HIDDEN is not needed
|
|
|
|
|
|
|
|
|
|
TRY(ds_push(fh, ptr)); // TODO maybe should do this at semicolon?
|
|
|
|
|
|
|
|
|
@ -290,6 +290,12 @@ static enum fh_error w_semicolon(struct fh_thread_s *fh, const struct fh_word_s |
|
|
|
|
// XXX if there was another definition previously and it was used in some other compiled function,
|
|
|
|
|
// that old implementation will still be called.
|
|
|
|
|
|
|
|
|
|
// unhide the entry, if hidden (colon does this to make the word unresolvable before it's finished)
|
|
|
|
|
struct fh_word_s *ww = fh_word_at(fh, fh->dict_last); |
|
|
|
|
if (ww && (ww->flags & WORDFLAG_WORD)) { |
|
|
|
|
ww->flags &= ~WORDFLAG_HIDDEN; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
return FH_OK; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|