Sfoglia il codice sorgente

More debug stuff.

tags/v1.0^2
Ben Kurtovic 10 anni fa
parent
commit
27ac48ea6c
1 ha cambiato i file con 8 aggiunte e 6 eliminazioni
  1. +8
    -6
      bitshift/query/__init__.py

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

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

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

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

: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)
print "parse:", node
print "out [%02d]:" % i, node
tree = Tree(node)
print "tree: ", tree
print " TREE:", tree
return tree
## TODO



Caricamento…
Annulla
Salva