@@ -168,6 +168,7 @@ def __init__(self, id, value=None, attributes=None,
168168 self .attributes = attributes or []
169169 self .comment = comment
170170
171+
171172class Term (Entry ):
172173 def __init__ (self , id , value , attributes = None ,
173174 comment = None , ** kwargs ):
@@ -177,72 +178,86 @@ def __init__(self, id, value, attributes=None,
177178 self .attributes = attributes or []
178179 self .comment = comment
179180
181+
180182class Pattern (SyntaxNode ):
181183 def __init__ (self , elements , ** kwargs ):
182184 super (Pattern , self ).__init__ (** kwargs )
183185 self .elements = elements
184186
187+
185188class PatternElement (SyntaxNode ):
186189 pass
187190
191+
188192class TextElement (PatternElement ):
189193 def __init__ (self , value , ** kwargs ):
190194 super (TextElement , self ).__init__ (** kwargs )
191195 self .value = value
192196
197+
193198class Placeable (PatternElement ):
194199 def __init__ (self , expression , ** kwargs ):
195200 super (Placeable , self ).__init__ (** kwargs )
196201 self .expression = expression
197202
203+
198204class Expression (SyntaxNode ):
199205 def __init__ (self , ** kwargs ):
200206 super (Expression , self ).__init__ (** kwargs )
201207
208+
202209class StringExpression (Expression ):
203210 def __init__ (self , value , ** kwargs ):
204211 super (StringExpression , self ).__init__ (** kwargs )
205212 self .value = value
206213
214+
207215class NumberExpression (Expression ):
208216 def __init__ (self , value , ** kwargs ):
209217 super (NumberExpression , self ).__init__ (** kwargs )
210218 self .value = value
211219
220+
212221class MessageReference (Expression ):
213222 def __init__ (self , id , ** kwargs ):
214223 super (MessageReference , self ).__init__ (** kwargs )
215224 self .id = id
216225
226+
217227class ExternalArgument (Expression ):
218228 def __init__ (self , id , ** kwargs ):
219229 super (ExternalArgument , self ).__init__ (** kwargs )
220230 self .id = id
221231
232+
222233class SelectExpression (Expression ):
223234 def __init__ (self , expression , variants , ** kwargs ):
224235 super (SelectExpression , self ).__init__ (** kwargs )
225236 self .expression = expression
226237 self .variants = variants
227238
239+
228240class AttributeExpression (Expression ):
229241 def __init__ (self , id , name , ** kwargs ):
230242 super (AttributeExpression , self ).__init__ (** kwargs )
231243 self .id = id
232244 self .name = name
233245
246+
234247class VariantExpression (Expression ):
235248 def __init__ (self , id , key , ** kwargs ):
236249 super (VariantExpression , self ).__init__ (** kwargs )
237250 self .id = id
238251 self .key = key
239252
253+
240254class CallExpression (Expression ):
241255 def __init__ (self , callee , args = None , ** kwargs ):
242256 super (CallExpression , self ).__init__ (** kwargs )
243257 self .callee = callee
244258 self .args = args or []
245259
260+
246261class Attribute (SyntaxNode ):
247262 def __init__ (self , id , value , ** kwargs ):
248263 super (Attribute , self ).__init__ (** kwargs )
@@ -253,6 +268,7 @@ def __init__(self, id, value, **kwargs):
253268 def sorting_key (self ):
254269 return self .id .name
255270
271+
256272class Variant (SyntaxNode ):
257273 def __init__ (self , key , value , default = False , ** kwargs ):
258274 super (Variant , self ).__init__ (** kwargs )
@@ -273,11 +289,13 @@ def __init__(self, name, val, **kwargs):
273289 self .name = name
274290 self .val = val
275291
292+
276293class Identifier (SyntaxNode ):
277294 def __init__ (self , name , ** kwargs ):
278295 super (Identifier , self ).__init__ (** kwargs )
279296 self .name = name
280297
298+
281299class VariantName (Identifier ):
282300 def __init__ (self , name , ** kwargs ):
283301 super (VariantName , self ).__init__ (name , ** kwargs )
@@ -308,6 +326,7 @@ class Function(Identifier):
308326 def __init__ (self , name , ** kwargs ):
309327 super (Function , self ).__init__ (name , ** kwargs )
310328
329+
311330class Junk (Entry ):
312331 def __init__ (self , content = None , ** kwargs ):
313332 super (Junk , self ).__init__ (** kwargs )
0 commit comments