changeset 4:c0c786f4bbb5

move tokenizer to separate class
author sheep@wintermute
date Wed, 14 Apr 2010 11:36:13 +0200
parents d0fecf87e3bc
children e69a0207568a
files jpath.py
diffstat 1 files changed, 1 insertions(+), 4 deletions(-) [+]
line wrap: on
line diff
--- a/jpath.py	Wed Apr 14 11:34:49 2010 +0200
+++ b/jpath.py	Wed Apr 14 11:36:13 2010 +0200
@@ -277,10 +277,7 @@
     """
 
     tokens = list(TOKENIZER.tokenize(jpath))
-    if not tokens:
-        return [data]
-    token, *tokens = tokens
-    return list(token.parse(tokens, data))
+    return list(Token.apply(tokens, data))
 
 def get(jpath, data):
     """