A semantic search engine for source code https://bitshift.benkurtovic.com/
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
 

19 lines
402 B

  1. __all__ = ["Tree"]
  2. class Tree(object):
  3. """Represents a query tree."""
  4. def __init__(self, root):
  5. self._root = root
  6. def __repr__(self):
  7. return "Tree({0})".format(self._root)
  8. def serialize(self):
  9. """Create a string representation of the query for caching.
  10. :return: Query string representation.
  11. :rtype: str
  12. """
  13. return repr(self)