xcbgen-parser: support switch-case
[free-sw/xcb/proto] / xcbgen / expr.py
index f9d5179..e4fb06e 100644 (file)
@@ -120,7 +120,7 @@ class Expression(object):
             for p in reversed(parents): 
                 fields = dict([(f.field_name, f) for f in p.fields])
                 if self.lenfield_name in fields.keys():
-                    if p.is_bitcase:
+                    if p.is_case_or_bitcase:
                         # switch is the anchestor 
                         self.lenfield_parent = p.parents[-1]
                     else: