Lines Matching refs:self
32 def __init__(self, slicc, literal, type):
33 super(LiteralExprAST, self).__init__(slicc)
34 self.literal = literal
35 self.type = type
37 def __repr__(self):
38 return "[Literal: %s]" % self.literal
40 def generate(self, code):
42 if self.type == "std::string":
43 code('("${{self.literal}}")')
44 elif self.type == "bool":
45 code('(${{str(self.literal).lower()}})')
47 code('(${{self.literal}})')
50 type = self.symtab.find(self.type, Type)
53 self.error("Internal: can't primitive type '%s'" % self.type)