1. A computer-implemented method, comprising: during compilation of a portion of source code at a compiler: initiating token resolution with respect to a token included in the portion of source code; querying a static context of the compiler and a dynamic context of the compiler; aggregating static context items received as a result of the static context query and dynamic context items received as a result of the dynamic context query to form lookup results; selecting a particular lookup result of the lookup results to resolve the token based on one or more semantic rules of the compiler, wherein the particular lookup result is selected independently of whether the particular lookup result is sourced from the static context or from the dynamic context; resolving the token based on the selected particular lookup result; creating a dynamic context item when a previously unencountered dynamic context item is returned by a token resolution interface; and caching the created dynamic context item, so that the created dynamic context item is retrievable to resolve instances of the token that are subsequently encountered by the compiler without further querying of the token resolution interface.