Lines Matching refs:self
31 def __init__(self, slicc, expr_ast, field):
32 super(MemberExprAST, self).__init__(slicc)
34 self.expr_ast = expr_ast
35 self.field = field
37 def __repr__(self):
38 return "[MemberExprAST: %r.%r]" % (self.expr_ast, self.field)
40 def generate(self, code):
41 return_type, gcode = self.expr_ast.inline(True)
48 code("(*$gcode).m_${{self.field}}")
50 code("($gcode).m_${{self.field}}")
55 if self.field in return_type.data_members:
57 return return_type.data_members[self.field].type
60 interface_type = self.symtab.find(return_type["interface"]);
62 if self.field in interface_type.data_members:
64 return interface_type.data_members[self.field].type
65 self.error("Invalid object field: " +
67 (return_type, self.field))