mojo/public/tools/mojom/mojom/generate/translate.py
def _LookupValueInScope(module, kind, identifier):
  """Given a kind and an identifier, this attempts to resolve the given
  identifier to a concrete NamedValue within the scope of the given kind."""
  scope = _GetScopeForKind(module, kind)
  for i in reversed(range(len(scope) + 1)):
    qualified_name = '.'.join(scope[:i] + (identifier, ))
    value = module.values.get(qualified_name)
    if value:
      return value
  return None
Given a kind and an identifier, this attempts to resolve the given
  identifier to a concrete NamedValue within the scope of the given kind.
Given a kind and an identifier, this attempts to resolve the given
identifier to a concrete NamedValue within the scope of the given kind.
Given a kind and an identifier this attempts to resolve the given identifier to a concrete NamedValue within the scope of the given kind .
def _LookupValueInScope(module, kind, identifier):
  scope = _GetScopeForKind(module, kind)
  for i in reversed(range(len(scope) + 1)):
    qualified_name = '.'.join(scope[:i] + (identifier, ))
    value = module.values.get(qualified_name)
    if value:
      return value
  return None
def _LookupValueInScope ( module , kind , identifier ) : scope = _GetScopeForKind ( module , kind ) for i in reversed ( range ( len ( scope ) + 1 ) ) : qualified_name = '.' . join ( scope [ : i ] + ( identifier , ) ) value = module . values . get ( qualified_name ) if value : return value return None
Given a kind and an identifier, this attempts to resolve the given
identifier to a concrete NamedValue within the scope of the given kind.
Given a kind and an identifier this attempts to resolve the given identifier to a concrete NamedValue within the scope of the given kind .
"""Given a kind and an identifier, this attempts to resolve the given
  identifier to a concrete NamedValue within the scope of the given kind."""
module
kind
identifier