parameters: (type)
docstring: Extract the outermost type from a field
docstring_summary: Extract the outermost type from a field
docstring_tokens: Extract the outermost type from a field
function: def field_type(type):
      """Extract the outermost type from a field"""
      if not isinstance(type, dict):
          if is_primitive(type):
              return type
          raise CmfParseError(type.parseinfo, f"Invalid field type: {type}")
      # The semantics class puts enum and msg into the same form as a compound
      for compound in ["list", "fixedlist", "kvpair", "map", "optional", "oneof", "enum", "msg"]:
          if compound in type:
              return compound
      raise CmfParseError(type.parseinfo, f"Invalid field type: {type}")
function_tokens: def field_type ( type ) : if not isinstance ( type , dict ) : if is_primitive ( type ) : return type raise CmfParseError ( type . parseinfo , f"Invalid field type: {type}" ) # The semantics class puts enum and msg into the same form as a compound for compound in [ "list" , "fixedlist" , "kvpair" , "map" , "optional" , "oneof" , "enum" , "msg" ] : if compound in type : return compound raise CmfParseError ( type . parseinfo , f"Invalid field type: {type}" )