def detect(source, path=None): parser = Parser(source, path) (node, mins, novermin) = parser.detect() if node is None: return mins visitor = SourceVisitor() visitor.set_no_lines(novermin) visitor.visit(node) return visitor.minimum_versions()
def visit(source): parser = Parser(source) (node, novermin) = parser.parse() visitor = SourceVisitor() visitor.set_no_lines(novermin) visitor.visit(node) return visitor
def visit(source): visitor = SourceVisitor() visitor.visit(parse_source(source)) return visitor
def visit(source): visitor = SourceVisitor() (node, novermin) = parse_source(source) visitor.set_no_lines(novermin) visitor.visit(node) return visitor