aboutsummaryrefslogtreecommitdiff
path: root/stdlib/source/library/lux/data/format/css/selector.lux
diff options
context:
space:
mode:
Diffstat (limited to 'stdlib/source/library/lux/data/format/css/selector.lux')
-rw-r--r--stdlib/source/library/lux/data/format/css/selector.lux30
1 files changed, 17 insertions, 13 deletions
diff --git a/stdlib/source/library/lux/data/format/css/selector.lux b/stdlib/source/library/lux/data/format/css/selector.lux
index bb6656d6e..35893766a 100644
--- a/stdlib/source/library/lux/data/format/css/selector.lux
+++ b/stdlib/source/library/lux/data/format/css/selector.lux
@@ -1,16 +1,17 @@
(.using
[library
- [lux {"-" or and for same? not}
+ [lux {"-" Label or and for same? not}
+ ["[0]" locale {"+" Locale}]
[data
["[0]" text
- ["%" format {"+" format}]]
+ ["%" format {"+" format}]]]
+ [math
[number
["i" int]]]
[type
abstract]
[macro
- ["[0]" template]]
- ["[0]" locale {"+" Locale}]]])
+ ["[0]" template]]]])
(type: .public Label Text)
@@ -57,23 +58,23 @@
[class Class "." Can_Chain]
)
- (template [<right> <left> <combo> <combinator>+]
+ (template [<right> <left> <combinator>+]
[(`` (template [<combinator> <name>]
[(def: .public (<name> right left)
- (-> (Selector <right>) (Selector <left>) (Selector <combo>))
+ (-> (Selector <right>) (Selector <left>) (Selector Composite))
(:abstraction (format (:representation left)
<combinator>
(:representation right))))]
(~~ (template.spliced <combinator>+))))]
- [Can_Chain (Generic Any) Can_Chain
+ [Can_Chain (Generic Any)
[["" and]]]
- [Unique (Generic Any) Composite
- [["" for]]]
- [Specific (Generic Any) Composite
+ [Specific (Generic Any)
[["" at]]]
- [Any Any Composite
+ [Unique (Generic Any)
+ [["" for]]]
+ [Any Any
[["," or]
[" " in]
[">" sub]
@@ -81,6 +82,9 @@
["~" later]]]
)
+ (type: .public (Specializer kind)
+ (-> (Selector kind) (Selector (Generic Any)) (Selector Composite)))
+
(type: .public Combinator
(-> (Selector Any) (Selector Any) (Selector Composite)))
@@ -104,7 +108,7 @@
(template [<kind> <pseudo>+]
[(`` (template [<name> <pseudo>]
[(def: .public <name>
- (Selector Can_Chain)
+ (Selector <kind>)
(:abstraction <pseudo>))]
(~~ (template.spliced <pseudo>+))))]
@@ -199,8 +203,8 @@
[nth_child ":nth-child"]
[nth_last_child ":nth-last-child"]
- [nth_last_of_type ":nth-last-of-type"]
[nth_of_type ":nth-of-type"]
+ [nth_last_of_type ":nth-last-of-type"]
)
)
)