@@ -168,6 +168,7 @@ def __init__(self, id, value=None, attributes=None,
168
168
self .attributes = attributes or []
169
169
self .comment = comment
170
170
171
+
171
172
class Term (Entry ):
172
173
def __init__ (self , id , value , attributes = None ,
173
174
comment = None , ** kwargs ):
@@ -177,72 +178,86 @@ def __init__(self, id, value, attributes=None,
177
178
self .attributes = attributes or []
178
179
self .comment = comment
179
180
181
+
180
182
class Pattern (SyntaxNode ):
181
183
def __init__ (self , elements , ** kwargs ):
182
184
super (Pattern , self ).__init__ (** kwargs )
183
185
self .elements = elements
184
186
187
+
185
188
class PatternElement (SyntaxNode ):
186
189
pass
187
190
191
+
188
192
class TextElement (PatternElement ):
189
193
def __init__ (self , value , ** kwargs ):
190
194
super (TextElement , self ).__init__ (** kwargs )
191
195
self .value = value
192
196
197
+
193
198
class Placeable (PatternElement ):
194
199
def __init__ (self , expression , ** kwargs ):
195
200
super (Placeable , self ).__init__ (** kwargs )
196
201
self .expression = expression
197
202
203
+
198
204
class Expression (SyntaxNode ):
199
205
def __init__ (self , ** kwargs ):
200
206
super (Expression , self ).__init__ (** kwargs )
201
207
208
+
202
209
class StringExpression (Expression ):
203
210
def __init__ (self , value , ** kwargs ):
204
211
super (StringExpression , self ).__init__ (** kwargs )
205
212
self .value = value
206
213
214
+
207
215
class NumberExpression (Expression ):
208
216
def __init__ (self , value , ** kwargs ):
209
217
super (NumberExpression , self ).__init__ (** kwargs )
210
218
self .value = value
211
219
220
+
212
221
class MessageReference (Expression ):
213
222
def __init__ (self , id , ** kwargs ):
214
223
super (MessageReference , self ).__init__ (** kwargs )
215
224
self .id = id
216
225
226
+
217
227
class ExternalArgument (Expression ):
218
228
def __init__ (self , id , ** kwargs ):
219
229
super (ExternalArgument , self ).__init__ (** kwargs )
220
230
self .id = id
221
231
232
+
222
233
class SelectExpression (Expression ):
223
234
def __init__ (self , expression , variants , ** kwargs ):
224
235
super (SelectExpression , self ).__init__ (** kwargs )
225
236
self .expression = expression
226
237
self .variants = variants
227
238
239
+
228
240
class AttributeExpression (Expression ):
229
241
def __init__ (self , id , name , ** kwargs ):
230
242
super (AttributeExpression , self ).__init__ (** kwargs )
231
243
self .id = id
232
244
self .name = name
233
245
246
+
234
247
class VariantExpression (Expression ):
235
248
def __init__ (self , id , key , ** kwargs ):
236
249
super (VariantExpression , self ).__init__ (** kwargs )
237
250
self .id = id
238
251
self .key = key
239
252
253
+
240
254
class CallExpression (Expression ):
241
255
def __init__ (self , callee , args = None , ** kwargs ):
242
256
super (CallExpression , self ).__init__ (** kwargs )
243
257
self .callee = callee
244
258
self .args = args or []
245
259
260
+
246
261
class Attribute (SyntaxNode ):
247
262
def __init__ (self , id , value , ** kwargs ):
248
263
super (Attribute , self ).__init__ (** kwargs )
@@ -253,6 +268,7 @@ def __init__(self, id, value, **kwargs):
253
268
def sorting_key (self ):
254
269
return self .id .name
255
270
271
+
256
272
class Variant (SyntaxNode ):
257
273
def __init__ (self , key , value , default = False , ** kwargs ):
258
274
super (Variant , self ).__init__ (** kwargs )
@@ -273,11 +289,13 @@ def __init__(self, name, val, **kwargs):
273
289
self .name = name
274
290
self .val = val
275
291
292
+
276
293
class Identifier (SyntaxNode ):
277
294
def __init__ (self , name , ** kwargs ):
278
295
super (Identifier , self ).__init__ (** kwargs )
279
296
self .name = name
280
297
298
+
281
299
class VariantName (Identifier ):
282
300
def __init__ (self , name , ** kwargs ):
283
301
super (VariantName , self ).__init__ (name , ** kwargs )
@@ -308,6 +326,7 @@ class Function(Identifier):
308
326
def __init__ (self , name , ** kwargs ):
309
327
super (Function , self ).__init__ (name , ** kwargs )
310
328
329
+
311
330
class Junk (Entry ):
312
331
def __init__ (self , content = None , ** kwargs ):
313
332
super (Junk , self ).__init__ (** kwargs )
0 commit comments