diff options
Diffstat (limited to 'src/mem/slicc/symbols/Type.py')
-rw-r--r-- | src/mem/slicc/symbols/Type.py | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/src/mem/slicc/symbols/Type.py b/src/mem/slicc/symbols/Type.py index 2541296dc..bafc6ea9e 100644 --- a/src/mem/slicc/symbols/Type.py +++ b/src/mem/slicc/symbols/Type.py @@ -430,8 +430,10 @@ enum ${{self.c_ident}} { # For each field for i,(ident,enum) in enumerate(self.enums.iteritems()): desc = enum.get("desc", "No description avaliable") - init = ' = %s_FIRST' % self.c_ident if i == 0 else '' - + if i == 0: + init = ' = %s_FIRST' % self.c_ident + else: + init = '' code('${{self.c_ident}}_${{enum.ident}}$init, /**< $desc */') code.dedent() code(''' |