def skip_char(self, char):
        """Skip the next character if it matches expectations."""
        if len(char) != 1:
            raise ValueError("only single characters allowed")
        elif not self.char:
            raise IOError("EOF found where %r expected" % char)
        elif self.char == char:
            self.advance()
        else:
            raise IOError("char %r found where %r expected" % (
                self.char, char))
dataset/ETHPy150Open grawity/hacks/lib/python/nullroute/sexp.py/SexpParser.skip_char/original