

def get_item(self, f, line):
    match = self.group_pattern.scanner(line).match()
    if (not match):
        return
    callback = self.lexicon[(match.lastindex - 1)][1]
    if ('def' in match.group()):
        first_line = match.group()
        (body, current_line) = self.get_multiline(f, match)
        sections = [first_line, body, current_line]
        content = '\n'.join(sections).strip()
        callback(self, content)
        if current_line:
            self.get_item(f, current_line)
    else:
        callback(self, match.group(1))

dataset/ETHPy150Open espeed/bulbs/bulbs/groovy.py Scanner.get_item/original