LocalVariableAST.py (8085:d1eb504fd302) | LocalVariableAST.py (8644:acf68e5a8cd7) |
---|---|
1# 2# Copyright (c) 2011 Mark D. Hill and David A. Wood 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; --- 38 unchanged lines hidden (view full) --- 47 type = self.type_ast.type; 48 ident = "%s" % self.ident; 49 50 # Add to symbol table 51 v = Var(self.symtab, self.ident, self.location, type, ident, 52 self.pairs) 53 self.symtab.newSymbol(v) 54 if self.pointer or str(type) == "TBE" or ( | 1# 2# Copyright (c) 2011 Mark D. Hill and David A. Wood 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; --- 38 unchanged lines hidden (view full) --- 47 type = self.type_ast.type; 48 ident = "%s" % self.ident; 49 50 # Add to symbol table 51 v = Var(self.symtab, self.ident, self.location, type, ident, 52 self.pairs) 53 self.symtab.newSymbol(v) 54 if self.pointer or str(type) == "TBE" or ( |
55 "interface" in type and type["interface"] == "AbstractCacheEntry"): | 55 "interface" in type and ( 56 type["interface"] == "AbstractCacheEntry" or 57 type["interface"] == "AbstractEntry")): |
56 code += "%s* %s" % (type.c_ident, ident) 57 else: 58 code += "%s %s" % (type.c_ident, ident) 59 return type | 58 code += "%s* %s" % (type.c_ident, ident) 59 else: 60 code += "%s %s" % (type.c_ident, ident) 61 return type |