def p_fused_definition(s, pos, ctx):
 if (ctx.level not in ('module', 'module_pxd')):
  error(pos, 'Fused type definition not allowed here')
 s.next()
 name = p_ident(s)
 s.expect(':')
 s.expect_newline()
 s.expect_indent()
 types = []
 while (s.sy != 'DEDENT'):
  if (s.sy != 'pass'):
   types.append(p_c_base_type(s))
  else:
   s.next()
  s.expect_newline()
 s.expect_dedent()
 if (not types):
  error(pos, 'Need at least one type')
 return Nodes.FusedTypeNode(pos, name=name, types=types)

def p_fused_definition ( s , pos , ctx ) : if ( ctx . level not in ( 'module' , 'module_pxd' ) ) : error ( pos , 'Fused type definition not allowed here' ) s . next ( ) name = p_ident ( s ) s . expect ( ':' ) s . expect_newline ( ) s . expect_indent ( ) types = [ ] while ( s . sy != 'DEDENT' ) : if ( s . sy != 'pass' ) : types . append ( p_c_base_type ( s ) ) else : s . next ( ) s . expect_newline ( ) s . expect_dedent ( ) if ( not types ) : error ( pos , 'Need at least one type' ) return Nodes . FusedTypeNode ( pos , name = name , types = types )
cdef fused my_fused_type: .