To describe (door - a door): ...
To describe (door - a locked door): ...
To describe (door - the golden door): ...
When you then use the describe door phrase, the compiler uses a Resolver_* function to determine which phrase function to call. The Resolver_* function however immediately calls that function, and you can’t use it to determine the address of the function in question. Is there a way to resolve phrases to their functions without calling them?
Alternatively, is there some way to assigning a phrase to an object property?
You can store a phrase in a property like this (chapter 21.3):
A person has a phrase thing -> nothing called op.
The op of the player is frobbling.
To frobble (T - thing) (this is frobbling):
say "Thing."
Instead of examining:
apply the op of the player to the noun.
Note that this only works for phrases that are explicitly named – the “(this is frobbling)” bit.
Also, you can’t use type resolution (the Resolver mechanism) when you do this. I7 is a little handwavy when it comes to type-dispatched phrases. It’ll do it, but in your example, each of the three describe phrases has to have a different name, so you can’t assign the group to a property.
Thanks! I thought I had tried that, but I hadn’t defined the property correctly.
In those situations I’m guess the “phrase” is actually what the I6 calls a closure (a struct)? If so I can easily get the address from the second word. I won’t need the resolver this way.