def id_tuple_list(self, id_node):
if id_node.type != "<STR_LIT:id>":<EOL><INDENT>raise QasmError("<STR_LIT>")<EOL><DEDENT>bit_list = []<EOL>try:<EOL><INDENT>g_sym = self.current_symtab[id_node.name]<EOL><DEDENT>except KeyError:<EOL><INDENT>g_sym = self.global_symtab[id_node.name]<EOL><DEDENT>if g_sym.type == "<STR_LIT>" or g_sym.type == "<STR_LIT>":<EOL><INDENT>for idx in range(g_sym.index):<EOL><INDENT>bit_list.append((id_node.name, idx))<EOL><DEDENT><DEDENT>else:<EOL><INDENT>bit_list.append((id_node.name, -<NUM_LIT:1>))<EOL><DEDENT>return bit_list<EOL>
Return a list of (name, index) tuples for this id node.