@@ -113,6 +113,9 @@ def is_index(self) -> bool:
113113 def is_question (self ) -> bool :
114114 return False
115115
116+ def accept (self , visitor : "CVisitor" ) -> None :
117+ raise UF .CHCError ("visitor not yet implemented for " + str (self ))
118+
116119 def __str__ (self ) -> str :
117120 return "attrparam:" + self .tags [0 ]
118121
@@ -135,6 +138,9 @@ def intvalue(self) -> int:
135138 def is_int (self ) -> bool :
136139 return True
137140
141+ def accept (self , visitor : "CVisitor" ) -> None :
142+ visitor .visit_attr_int (self )
143+
138144 def __str__ (self ) -> str :
139145 return "aint(" + str (self .intvalue ) + ")"
140146
@@ -157,6 +163,9 @@ def stringvalue(self) -> str:
157163 def is_str (self ) -> bool :
158164 return True
159165
166+ def accept (self , visitor : "CVisitor" ) -> None :
167+ visitor .visit_attr_str (self )
168+
160169 def __str__ (self ) -> str :
161170 return "astr(" + str (self .stringvalue ) + ")"
162171
@@ -184,6 +193,9 @@ def params(self) -> List[CAttr]:
184193 def is_cons (self ) -> bool :
185194 return True
186195
196+ def accept (self , visitor : "CVisitor" ) -> None :
197+ visitor .visit_attr_cons (self )
198+
187199 def __str__ (self ) -> str :
188200 return "acons(" + str (self .name ) + ")"
189201
@@ -206,6 +218,9 @@ def typ(self) -> "CTyp":
206218 def is_sizeof (self ) -> bool :
207219 return True
208220
221+ def accept (self , visitor : "CVisitor" ) -> None :
222+ visitor .visit_attr_sizeof (self )
223+
209224 def __str__ (self ) -> str :
210225 return "asizeof(" + str (self .typ ) + ")"
211226
@@ -228,6 +243,9 @@ def param(self) -> CAttr:
228243 def is_sizeofe (self ) -> bool :
229244 return True
230245
246+ def accept (self , visitor : "CVisitor" ) -> None :
247+ visitor .visit_attr_sizeofe (self )
248+
231249 def __str__ (self ) -> str :
232250 return "asizeofe(" + str (self .param ) + ")"
233251
@@ -250,6 +268,9 @@ def typsig(self) -> "CTypsig":
250268 def is_sizeofs (self ) -> bool :
251269 return True
252270
271+ def accept (self , visitor : "CVisitor" ) -> None :
272+ visitor .visit_attr_sizeofs (self )
273+
253274 def __str__ (self ) -> str :
254275 return "asizeofs(" + str (self .typsig ) + ")"
255276
@@ -272,6 +293,9 @@ def typ(self) -> "CTyp":
272293 def is_alignof (self ) -> bool :
273294 return True
274295
296+ def accept (self , visitor : "CVisitor" ) -> None :
297+ visitor .visit_attr_alignof (self )
298+
275299 def __str__ (self ) -> str :
276300 return "aalignof(" + str (self .typ ) + ")"
277301
@@ -294,6 +318,9 @@ def param(self) -> CAttr:
294318 def is_alignofe (self ) -> bool :
295319 return True
296320
321+ def accept (self , visitor : "CVisitor" ) -> None :
322+ visitor .visit_attr_alignofe (self )
323+
297324 def __str__ (self ) -> str :
298325 return "aalignofe(" + str (self .param ) + ")"
299326
@@ -316,6 +343,9 @@ def typsig(self) -> "CTypsig":
316343 def is_alignofs (self ) -> bool :
317344 return True
318345
346+ def accept (self , visitor : "CVisitor" ) -> None :
347+ visitor .visit_attr_alignofs (self )
348+
319349 def __str__ (self ) -> str :
320350 return "aalignofs(" + str (self .typsig ) + ")"
321351
@@ -343,6 +373,9 @@ def param(self) -> CAttr:
343373 def is_unop (self ) -> bool :
344374 return True
345375
376+ def acecpt (self , visitor : "CVisitor" ) -> None :
377+ visitor .visit_attr_unop (self )
378+
346379 def __str__ (self ) -> str :
347380 return "aunop(" + self .op + "," + str (self .param ) + ")"
348381
@@ -375,6 +408,9 @@ def param2(self) -> CAttr:
375408 def is_binop (self ) -> bool :
376409 return True
377410
411+ def accept (self , visitor : "CVisitor" ) -> None :
412+ visitor .visit_attr_binop (self )
413+
378414 def __str__ (self ) -> str :
379415 return (
380416 "abinop("
@@ -410,6 +446,9 @@ def param(self) -> CAttr:
410446 def is_dot (self ) -> bool :
411447 return True
412448
449+ def accept (self , visitor : "CVisitor" ) -> None :
450+ visitor .visit_attr_dot (self )
451+
413452 def __str__ (self ) -> str :
414453 return "adot(" + str (self .param ) + "." + self .suffix + ")"
415454
@@ -436,6 +475,9 @@ def param(self) -> CAttr:
436475 def is_star (self ) -> bool :
437476 return True
438477
478+ def accept (self , visitor : "CVisitor" ) -> None :
479+ visitor .visit_attr_star (self )
480+
439481 def __str__ (self ) -> str :
440482 if self .index == self .args [0 ]:
441483 return "astar()"
@@ -461,6 +503,9 @@ def param(self) -> CAttr:
461503 def is_addrof (self ) -> bool :
462504 return True
463505
506+ def accept (self , visitor : "CVisitor" ) -> None :
507+ visitor .visit_attr_addrof (self )
508+
464509 def __str__ (self ) -> str :
465510 return "aaddrof(" + str (self .param ) + ")"
466511
@@ -488,6 +533,9 @@ def param2(self) -> CAttr:
488533 def is_index (self ) -> bool :
489534 return True
490535
536+ def accept (self , visitor : "CVisitor" ) -> None :
537+ visitor .visit_attr_index (self )
538+
491539 def __str__ (self ) -> str :
492540 return "aindex(" + str (self .param1 ) + "," + str (self .param2 ) + ")"
493541
@@ -516,6 +564,9 @@ def param2(self) -> CAttr:
516564 def param3 (self ) -> CAttr :
517565 return self .cd .get_attrparam (int (self .args [2 ]))
518566
567+ def accept (self , visitor : "CVisitor" ) -> None :
568+ visitor .visit_attr_question (self )
569+
519570 def __str__ (self ) -> str :
520571 return (
521572 "aquestion("
@@ -541,6 +592,9 @@ def name(self) -> str:
541592 def params (self ) -> List [CAttr ]:
542593 return [self .cd .get_attrparam (int (i )) for i in self .args ]
543594
595+ def accept (self , visitor : "CVisitor" ) -> None :
596+ visitor .visit_attribute (self )
597+
544598 def __str__ (self ) -> str :
545599 return self .name + ": " + "," .join ([str (p ) for p in self .params ])
546600
0 commit comments