@ Override public TypedScope createScope ( Node root , AbstractScope < ? , ? > parent ) { checkArgument ( parent == null || parent instanceof TypedScope ) ; TypedScope typedParent = ( TypedScope ) parent ; TypedScope scope = memoized . get ( root ) ; if ( scope != null ) { checkState ( typedParent == scope . getParent ( ) ) ; } else { scope = createScopeInternal ( root , typedParent ) ; memoized . put ( root , scope ) ; } return scope ; }
Creates a scope with all types declared . Declares newly discovered types and type properties in the type registry .