Safe Haskell | Safe-Inferred |
---|---|
Language | Haskell2010 |
Parsing CSS selectors into queries.
Synopsis
- data SelectorGroup
- data Selector
- parseQuery :: Text -> Either String [[SelectorGroup]]
Documentation
data SelectorGroup Source #
Instances
Show SelectorGroup Source # | |
Defined in Yesod.Test.CssQuery showsPrec :: Int -> SelectorGroup -> ShowS # show :: SelectorGroup -> String # showList :: [SelectorGroup] -> ShowS # | |
Eq SelectorGroup Source # | |
Defined in Yesod.Test.CssQuery (==) :: SelectorGroup -> SelectorGroup -> Bool # (/=) :: SelectorGroup -> SelectorGroup -> Bool # |
parseQuery :: Text -> Either String [[SelectorGroup]] Source #
Parses a query into an intermediate format which is easy to feed to HXT
- The top-level lists represent the top level comma separated queries.
- SelectorGroup is a group of qualifiers which are separated with spaces or > like these three: table.main.odd tr.even > td.big
- A SelectorGroup as a list of Selector items, following the above example the selectors in the group are: table, .main and .odd