third_party/blink/renderer/bindings/scripts/web_idl/ir_map.py
def register(self, ir):
        """
        Registers the given IR to this map.

        Duplicated registration is not allowed.  The registration must be for
        the first time.
        """
        assert isinstance(ir, IRMap.IR), ir
        # Assert |ir| doesn't yet exist in this map.
        try:
            if ir.does_support_multiple_defs:
                irs = self.find_by_kind(ir.kind)
                assert ir not in irs[ir.identifier]
            else:
                duplicated_ir = self.find_by_identifier(ir.identifier)
                # We don't allow to declare a definition of an IDL definition in
                # multiple places.
                raise ValueError('{} {} is defined twice.\n  {}\n  {}'.format(
                    ir.kind, ir.identifier, ir.debug_info.location,
                    duplicated_ir.debug_info.location))
        except KeyError:
            pass
        self.add(ir)

        Registers the given IR to this map.

        Duplicated registration is not allowed.  The registration must be for
        the first time.
        
Registers the given IR to this map.
Duplicated registration is not allowed.  The registration must be for
the first time.
Registers the given IR to this map . Duplicated registration is not allowed . The registration must be for the first time .
def register(self, ir):
        assert isinstance(ir, IRMap.IR), ir
        try:
            if ir.does_support_multiple_defs:
                irs = self.find_by_kind(ir.kind)
                assert ir not in irs[ir.identifier]
            else:
                duplicated_ir = self.find_by_identifier(ir.identifier)
                raise ValueError('{} {} is defined twice.\n  {}\n  {}'.format(
                    ir.kind, ir.identifier, ir.debug_info.location,
                    duplicated_ir.debug_info.location))
        except KeyError:
            pass
        self.add(ir)
def register ( self , ir ) : assert isinstance ( ir , IRMap . IR ) , ir try : if ir . does_support_multiple_defs : irs = self . find_by_kind ( ir . kind ) assert ir not in irs [ ir . identifier ] else : duplicated_ir = self . find_by_identifier ( ir . identifier ) raise ValueError ( '{} {} is defined twice.\n  {}\n  {}' . format ( ir . kind , ir . identifier , ir . debug_info . location , duplicated_ir . debug_info . location ) ) except KeyError : pass self . add ( ir )
Registers the given IR to this map.
Registers the given IR to this map .
"""
        Registers the given IR to this map.

        Duplicated registration is not allowed.  The registration must be for
        the first time.
        """ # Assert |ir| doesn't yet exist in this map. # We don't allow to declare a definition of an IDL definition in # multiple places.
self
ir