EnumDeclAST.py (10984:a86f453a7caa) EnumDeclAST.py (11030:17240f381d6a)
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;

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

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 + "_" + t.c_ident,
69 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;

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

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 + "_" + t.c_ident,
69 func_id, self.location,
70 self.symtab.find("std::string", Type), [ t ], [], "",
70 self.symtab.find("std::string", Type), [ t ], [], [], "",
71 pairs)
72 self.symtab.newSymbol(func)
71 pairs)
72 self.symtab.newSymbol(func)