What it means
When an expression like a + b is evaluated, each identifier (a, b) must be resolved to an owner — the object that contains it. IIdentifierOwnerResolver defines this contract: resolve(index, context) returns the owning object or null to pass to the next resolver in the list.
DefaultIdentifierOwnerResolver is the default implementation. It holds an ordered resolver list via DI (IIdentifierOwnerResolverList) and iterates until one returns a non-null owner.
The default list, in priority order:
- PropertyOwnerResolver — returns the context if it has the given property or field (including Date properties).
- ArrayIndexOwnerResolver — returns the array if the index is a valid numeric position within it.
- SetKeyOwnerResolver — returns the Set if it contains the given key.
- MapKeyOwnerResolver — returns the Map if it has the given key.
- GlobalIdentifierOwnerResolver — returns
globalThisif the identifier is in the allowed globals list (Math,Date,console, and others).