def from_source(cls, src, trace=False, define_builtins=True): scope = Scope(define_builtins=define_builtins) visitor = UnknownSymbolVisitor(scope, trace=trace) if isinstance(src, string_types): src = parse_ast(src) visitor.visit(src) scope.flush_symbol() return scope
def index_source(self, filename, source): try: st = parse_ast(source, filename) except Exception as e: logger.debug('failed to parse %s: %s', filename, e) return False visitor = SymbolVisitor(self) visitor.visit(st) return True
def index_source(self, filename, source): try: st = parse_ast(source, filename) except Exception as e: logger.debug("failed to parse %s: %s", filename, e) return False visitor = SymbolVisitor(self) visitor.visit(st) return True
def index_source(self, filename, source): try: st = parse_ast(source, filename) except Exception as e: print('Failed to parse %s: %s' % (filename, e)) return False visitor = SymbolVisitor(self) visitor.visit(st) return True