/
transformer.ometajs
152 lines (103 loc) · 3.26 KB
/
transformer.ometajs
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
ometa CSSTransformer {
anys = any*,
before = [],
after = [],
any = before
| ident
| atkeyword
| string
| shash
| vhash
| number
| percentage
| dimension
| cdo
| cdc
| decldelim
| s
| attrselector
| attrib
| nth
| nthselector
| namespace
| clazz
| pseudoe
| pseudoc
| delim
| stylesheet
| atruleb
| atrules
| atrulerq
| atrulers
| atruler
| block
| ruleset
| combinator
| simpleselector
| selector
| declaration
| property
| important
| unary
| operator
| braces
| value
| progid
| filterv
| filter
| comment
| uri
| raw
| functionBody
| funktion
| functionExpression
| after,
ident = ['ident':t :x] -> [t, x],
atkeyword = ['atkeyword':t any:x] -> [t, x],
string = ['string':t :x] -> [t, x],
shash = ['shash':t :x] -> [t, x],
vhash = ['vhash':t :x] -> [t, x],
number = ['number':t :x] -> [t, x],
percentage = ['percentage':t any:x] -> [t, x],
dimension = ['dimension':t any:x any:y] -> [t, x, y],
cdo = ['cdo':t] -> [t],
cdc = ['cdc':t] -> [t],
decldelim = ['decldelim':t] -> [t],
s = ['s':t :x] -> [t, x],
attrselector = ['attrselector':t :x] -> [t, x],
attrib = ['attrib':t anys:x] -> [t].concat(x),
nth = ['nth':t :x] -> [t, x],
nthselector = ['nthselector':t any:x anys:y] -> [t, x].concat(y),
namespace = ['namespace':t] -> [t],
clazz = ['clazz':t :x] -> [t, x],
pseudoe = ['pseudoe':t :x] -> [t, x],
pseudoc = ['pseudoc':t :x] -> [t, x],
delim = ['delim':t] -> [t],
stylesheet = ['stylesheet':t anys:x] -> [t].concat(x),
atruleb = ['atruleb':t anys:x] -> [t].concat(x),
atrules = ['atrules':t anys:x] -> [t].concat(x),
atrulerq = ['atrulerq':t anys:x] -> [t].concat(x),
atrulers = ['atrulers':t anys:x] -> [t].concat(x),
atruler = ['atruler':t anys:x] -> [t].concat(x),
block = ['block':t anys:x] -> [t].concat(x),
ruleset = ['ruleset':t anys:x] -> [t].concat(x),
combinator = ['combinator':t :x] -> [t, x],
simpleselector = ['simpleselector':t anys:x] -> [t].concat(x),
selector = ['selector':t anys:x] -> [t].concat(x),
declaration = ['declaration':t any:p any:v] -> [t, p, v],
property = ['property':t anys:x] -> [t].concat(x),
important = ['important':t anys:x] -> [t].concat(x),
unary = ['unary':t :x] -> [t, x],
operator = ['operator':t :x] -> [t, x],
braces = ['braces':t :x :y anys:z] -> [t, x, y].concat(z),
value = ['value':t anys:x] -> [t].concat(x),
progid = ['progid':t anys:x] -> [t].concat(x),
filterv = ['filterv':t anys:x] -> [t].concat(x),
filter = ['filter':t any:p any:v] -> [t, p, v],
comment = ['comment':t :x] -> [t, x],
uri = ['uri':t anys:x] -> [t].concat(x),
raw = ['raw':t :x] -> [t, x],
functionBody = ['functionBody':t anys:x] -> [t].concat(x),
funktion = ['funktion':t any:x any:y] -> [t, x, y],
functionExpression = ['functionExpression':t :x] -> [t, x]
}