Lines Matching refs:self
32 def __init__(self, slicc, type_ast, pairs, fields):
33 super(EnumDeclAST, self).__init__(slicc, pairs)
35 self.type_ast = type_ast
36 self.fields = fields
38 def __repr__(self):
39 return "[EnumDecl: %s]" % (self.type_ast)
41 def files(self, parent=None):
42 if "external" in self:
46 ident = "%s_%s" % (parent, self.type_ast.ident)
48 ident = self.type_ast.ident
52 def generate(self):
53 ident = str(self.type_ast)
56 t = Type(self.symtab, ident, self.location, self.pairs,
57 self.state_machine)
58 self.symtab.newSymbol(t)
61 for field in self.fields:
68 func = Func(self.symtab, func_id + "_" + t.c_ident,
69 func_id, self.location,
70 self.symtab.find("std::string", Type), [ t ], [], "",
72 self.symtab.newSymbol(func)