

def _match_pattern(self):
    buf = []
    while ((self.c != EOF) and (self.c != self.delimiter)):
        if (self.c == '\\'):
            buf.append(self.c)
            self.consume()
            if (self.c == self.delimiter):
                buf[(- 1)] = self.delimiter
                self.consume()
            if (self.c in '\\'):
                buf.append(buf.c)
                self.consume()
            if (self.c == EOF):
                break
        else:
            buf.append(self.c)
            self.consume()
    return ''.join(buf)

dataset/ETHPy150Open SublimeText/VintageEx/vex/parsers/s_cmd.py SubstituteLexer._match_pattern/VarMisuse@111/119 `self`->`buf`