def set_ion_type(self, ion_type):
        """Sets context to the given IonType."""
        if ion_type is self.ion_type:
            return self
        self.ion_type = ion_type
        self.line_comment = False
        return self