occam-dom 3.1.30 → 3.1.32
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +18 -22
- package/example.js +132 -2551
- package/lib/example/view.js +6 -6
- package/package.json +5 -5
- package/src/example/view.js +11 -11
package/README.md
CHANGED
|
@@ -19,29 +19,25 @@ A query expression consists of a leading, forward slash `/` followed by an optio
|
|
|
19
19
|
|
|
20
20
|
Here is an example DOM together with some query expressions and their meaning, to help clarify:
|
|
21
21
|
```
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
|
38
|
-
zero[unassigned](2)
|
|
39
|
-
|
|
22
|
+
stylesheet
|
|
23
|
+
|
|
|
24
|
+
ruleSet
|
|
25
|
+
|
|
|
26
|
+
------------------------------------------------------------------------------------------------------
|
|
27
|
+
| | | |
|
|
28
|
+
selectors {[special] declaration }[special]
|
|
29
|
+
| |
|
|
30
|
+
selector ---------------------------------------------
|
|
31
|
+
| | | | |
|
|
32
|
+
class property :[special] expression ;[special]
|
|
33
|
+
| | |
|
|
34
|
+
------------------------------- background[identifier] term
|
|
35
|
+
| | | |
|
|
36
|
+
.[special] <NO_WHITESPACE> view[identifier] red[identifier]
|
|
40
37
|
```
|
|
41
|
-
* `/
|
|
42
|
-
* `//term` matches all non-terminal nodes
|
|
43
|
-
* `//@
|
|
44
|
-
* `/*/*` matches all second-level non-terminal nodes, in this case the `declaration` and `verticalSpace` nodes.
|
|
38
|
+
* `/stylesheet` matches the topmost `stylesheet` non-terminal node.
|
|
39
|
+
* `//term` matches all `term` non-terminal nodes to an arbitrary depth.
|
|
40
|
+
* `//@special[2...4]` matches from the third to the fifth of all `special` terminal nodes.
|
|
45
41
|
|
|
46
42
|
## Installation
|
|
47
43
|
|