Browse Source

More debug stuff.

tags/v1.0^2
Ben Kurtovic 10 years ago
parent
commit
27ac48ea6c
1 changed files with 8 additions and 6 deletions
  1. +8
    -6
      bitshift/query/__init__.py

+ 8
- 6
bitshift/query/__init__.py View File

@@ -31,7 +31,8 @@ class _QueryParser(object):
} }


def _parse_language(self, term): def _parse_language(self, term):
pass
## TODO: look up language ID
return Language(0)


def _parse_author(self, term): def _parse_author(self, term):
pass pass
@@ -85,13 +86,14 @@ class _QueryParser(object):


:raises: :py:class:`.QueryParseException` :raises: :py:class:`.QueryParseException`
""" """
print "input:", query
for term in split(query):
print "term: ", term
print " STRING:", query
for i, term in enumerate(split(query), 1):
## TODO: remove enumerate when removing debug prints
print " in [%02d]:" % i, term
node = self._parse_term(term) node = self._parse_term(term)
print "parse:", node
print "out [%02d]:" % i, node
tree = Tree(node) tree = Tree(node)
print "tree: ", tree
print " TREE:", tree
return tree return tree
## TODO ## TODO




Loading…
Cancel
Save