def match(self, pattern):
        '''
        Returns the match obtained by searching @pattern.

        The current `position` will advance as many characters as the match's
        length.

        @pattern
          A regular expression.
        '''
        m = re.compile(pattern).match(self.source, self.position)
        if m:
            self.position += m.end() - m.start()
            return m
        return
dataset/ETHPy150Open guillermooo/Vintageous/ex/parser/state.py/ScannerState.match/original