1# Copyright (c) 1999-2008 Mark D. Hill and David A. Wood 2# Copyright (c) 2009 The Hewlett-Packard Development Company 3# All rights reserved. 4# 5# Redistribution and use in source and binary forms, with or without 6# modification, are permitted provided that the following conditions are 7# met: redistributions of source code must retain the above copyright 8# notice, this list of conditions and the following disclaimer; --- 28 unchanged lines hidden (view full) --- 37 return "[ExprStatementAST: %s]" % (self.expr) 38 39 def generate(self, code, return_type): 40 actual_type,rcode = self.expr.inline(True) 41 code("$rcode;") 42 43 # The return type must be void 44 if actual_type != self.symtab.find("void", Type): |
45 self.expr.warning("Non-void return ignored, " + \ 46 "return type is '%s'", actual_type.ident) |
47 48 def findResources(self, resources): 49 self.expr.findResources(resources) 50 |