def visit_Typedef(self, node): self.pre_order.append(KeyWord.TYPEDEF) self.pre_order.append(Word(node.name)) self.visit(node.type)
def visit_Label(self, node): self.pre_order.append(KeyWord.LABEL) self.pre_order.append(Word(node.name)) self.visit(node.stmt)
def visit_TypeDecl(self, node): # todo: const? self.pre_order.append(Word(node.declname)) self.pre_order.append(KeyWord.TYPE) self.visit(node.type)
def visit_IdentifierType(self, node): for name in node.names: self.pre_order.append(Word(name))
def visit_ID(self, node): self.pre_order.append(Word(node.name))
def visit_Goto(self, node): self.pre_order.append(KeyWord.GOTO) self.pre_order.append(Word(node.name))
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)
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)