@ Override public Value check ( ILexNameToken name ) { // A RootContext stops the name search from continuing down the // context chain. It first checks any local context, then it // checks the "class" context, then it goes down to the global level. Value v = get ( name ) ; // Local variables if ( v != null ) { return v ; } if ( freeVariables != null ) { v = freeVariables . get ( name ) ; if ( v != null ) { return v ; } } v = assistantFactory . createSClassDefinitionAssistant ( ) . getStatic ( classdef , name ) ; if ( v != null ) { return v ; } Context g = getGlobal ( ) ; if ( g != this ) { return g . check ( name ) ; } return v ; }
Check for the name in the current context and classdef and if not present search the global context . Note that the context chain is not followed .