Permalink
Browse files

moved selector code into own package

  • Loading branch information...
1 parent 0487d89 commit f6223652bdc3cd5e5907bf8ab15e987fa9ec6e86 @jtauber committed Jul 9, 2012
View
@@ -0,0 +1,5 @@
+from .parser import parser
+
+
+def selector(s):
+ return parser.parse(s)
File renamed without changes.
@@ -1,8 +1,8 @@
-from selectors import ElementSelector, AttributeSelector
+from .selectors import ElementSelector, AttributeSelector
import ply.yacc as yacc
-from selectors_lex import tokens
+from .lexer import tokens
def p_selectors_group(p):
File renamed without changes.
View
@@ -2,17 +2,13 @@
import html5lib
-from selectors_parse import parser
+from selectors import selector
def html(s):
return html5lib.parse(s).childNodes[0].childNodes[1].childNodes[0]
-def selector(s):
- return parser.parse(s)
-
-
## 6.1 type selector
assert selector("e").selects(html("<e>"))

0 comments on commit f622365

Please sign in to comment.