def add_mappings(self, defn: Definition, target: Dict) -> None:
self.add_id_prefixes(defn)<EOL>for mapping in defn.mappings:<EOL><INDENT>if '<STR_LIT>' in mapping:<EOL><INDENT>target['<STR_LIT>'] = mapping<EOL><DEDENT>else:<EOL><INDENT>if '<STR_LIT::>' not in mapping or len(mapping.split('<STR_LIT::>')) != <NUM_LIT:2>:<EOL><INDENT>raise ValueError(f"<STR_LIT>")<EOL><DEDENT>ns = mapping.split('<STR_LIT::>')[<NUM_LIT:0>]<EOL>self.add_prefix(ns)<EOL>target['<STR_LIT>'] = defn.mappings[<NUM_LIT:0>]<EOL><DEDENT><DEDENT>
Process any mappings in defn, adding all of the mappings prefixes to the namespace map and
        add a link to the first mapping to the target

        @param defn: Class or Slot definition
        @param target: context target