qiskit/qasm/qasmparser.py
def update_symtab(self, obj):
        """Update a node in the symbol table.

        Everything in the symtab must be a node with these attributes:
        name - the string name of the object
        type - the string type of the object
        line - the source line where the type was first found
        file - the source file where the type was first found
        """
        if obj.name in self.current_symtab:
            prev = self.current_symtab[obj.name]
            raise QasmError("Duplicate declaration for", obj.type + " '"
                            + obj.name + "' at line", str(obj.line)
                            + ', file', obj.file
                            + '.\nPrevious occurrence at line',
                            str(prev.line) + ', file', prev.file)
        self.current_symtab[obj.name] = obj
def update_symtab(self, obj):
        """Update a node in the symbol table.

        Everything in the symtab must be a node with these attributes:
        name - the string name of the object
        type - the string type of the object
        line - the source line where the type was first found
        file - the source file where the type was first found
        """
        if obj.name in self.current_symtab:
            prev = self.current_symtab[obj.name]
            raise QasmError("Duplicate declaration for", obj.type + " '"
                            + obj.name + "' at line", str(obj.line)
                            + ', file', obj.file
                            + '.\nPrevious occurrence at line',
                            str(prev.line) + ', file', prev.file)
        self.current_symtab[obj.name] = obj
Update a node in the symbol table.

        Everything in the symtab must be a node with these attributes:
        name - the string name of the object
        type - the string type of the object
        line - the source line where the type was first found
        file - the source file where the type was first found