Example #1
0
 def visit_Typedef(self, node):
     self.pre_order.append(KeyWord.TYPEDEF)
     self.pre_order.append(Word(node.name))
     self.visit(node.type)
Example #2
0
 def visit_Label(self, node):
     self.pre_order.append(KeyWord.LABEL)
     self.pre_order.append(Word(node.name))
     self.visit(node.stmt)
Example #3
0
 def visit_TypeDecl(self, node):
     # todo: const?
     self.pre_order.append(Word(node.declname))
     self.pre_order.append(KeyWord.TYPE)
     self.visit(node.type)
Example #4
0
 def visit_IdentifierType(self, node):
     for name in node.names:
         self.pre_order.append(Word(name))
Example #5
0
 def visit_ID(self, node):
     self.pre_order.append(Word(node.name))
Example #6
0
 def visit_Goto(self, node):
     self.pre_order.append(KeyWord.GOTO)
     self.pre_order.append(Word(node.name))
Example #7
0
 def visit_Enumerator(self, node):
     self.pre_order.append(KeyWord.ENUM_MEMBER)
     self.pre_order.append(Word(node.name))
     self.pre_order.append(KeyWord.ENUM_VALUE)
     self.visit(node.value)
Example #8
0
 def visit_Enum(self, node):
     self.pre_order.append(KeyWord.ENUM_DECL)
     if node.name:
         self.pre_order.append(KeyWord.ENUM_NAME)
         self.pre_order.append(Word(node.name))
     self.visit(node.values)