EnumDeclAST.py (6714:028047200ff7) EnumDeclAST.py (7055:4e24742201d7)
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;

--- 52 unchanged lines hidden (view full) ---

61 for field in self.fields:
62 field.generate(t)
63
64 # Add the implicit State_to_string method - FIXME, this is a bit dirty
65 func_id = "%s_to_string" % t.c_ident
66
67 pairs = { "external" : "yes" }
68 func = Func(self.symtab, func_id, self.location,
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;

--- 52 unchanged lines hidden (view full) ---

61 for field in self.fields:
62 field.generate(t)
63
64 # Add the implicit State_to_string method - FIXME, this is a bit dirty
65 func_id = "%s_to_string" % t.c_ident
66
67 pairs = { "external" : "yes" }
68 func = Func(self.symtab, func_id, self.location,
69 self.symtab.find("string", Type), [ t ], [], "",
69 self.symtab.find("std::string", Type), [ t ], [], "",
70 pairs, None)
71 self.symtab.newSymbol(func)
70 pairs, None)
71 self.symtab.newSymbol(func)