I think normal forth words are way closer to that. They (1) normally just do whatever their definition implies, but inside a colon definition, they (1) compile code that does whatever their definition implies.
They do miss C++ constexpr (https://en.cppreference.com/w/cpp/language/constexpr). I haven’t read Zig docs, but that seems highly similar to Zig’s comptime to me.
(1) technically, it’s not “they” doing that themselves but whatever code processes them.
but also you can just put the code you would have put between the [ ] delimiter words into an immediate word, and call it where you would have put the [ ] block. the effect is not exactly the same but it has semantics slightly more consistent with the usual semantics because your immediate word is in fact compiled just like non-immediate words are
MIT AI Memo 57, Timothy P. Hart, MACRO Definitions for LISP, October 1963
http://bitsavers.informatik.uni-stuttgart.de/pdf/mit/ai/aim/...
Lisp languages tend to blend together "runtime" with "load time", and in case of compiled languages, also "compile time". You can write code executing during any one, or any combination of, these phases. You can reuse code between those phases. You can interleave them at will - e.g. by loading more code at runtime, or invoking a compiler, etc.