about summary refs log tree commit diff stats
path: root/src/css/selparser.nim
diff options
context:
space:
mode:
Diffstat (limited to 'src/css/selparser.nim')
-rw-r--r--src/css/selparser.nim11
1 files changed, 0 insertions, 11 deletions
diff --git a/src/css/selparser.nim b/src/css/selparser.nim
index 0c1655aa..67f53b42 100644
--- a/src/css/selparser.nim
+++ b/src/css/selparser.nim
@@ -1,5 +1,4 @@
 import unicode
-import streams
 
 import css/parser
 import html/tags
@@ -57,9 +56,6 @@ type
     sels*: seq[Selector]
     parent*: SelectorList
 
-  ParsedRule* = tuple[sels: seq[SelectorList], oblock: CSSSimpleBlock]
-  ParsedStylesheet* = seq[ParsedRule]
-
 proc add*(sellist: SelectorList, sel: Selector) = sellist.sels.add(sel)
 proc add*(sellist: SelectorList, sels: SelectorList) = sellist.sels.add(sels.sels)
 proc setLen*(sellist: SelectorList, i: int) = sellist.sels.setLen(i)
@@ -301,10 +297,3 @@ func parseSelectors*(cvals: seq[CSSComponentValue]): seq[SelectorList] =
     state.selectors[^1].add(state.combinator)
     state.combinator = nil
   return state.selectors
-
-#TODO this is pretty dumb
-proc parseStylesheet*(s: Stream): ParsedStylesheet =
-  for v in parseCSS(s).value:
-    let sels = parseSelectors(v.prelude)
-    if sels.len > 1 or sels[^1].len > 0:
-      result.add((sels, v.oblock))