Source file src/debug/dwarf/tag_string.go

Documentation: debug/dwarf

     1  // Code generated by "stringer -type Tag -trimprefix=Tag"; DO NOT EDIT.
     2  
     3  package dwarf
     4  
     5  import "strconv"
     6  
     7  const (
     8  	_Tag_name_0 = "ArrayTypeClassTypeEntryPointEnumerationTypeFormalParameter"
     9  	_Tag_name_1 = "ImportedDeclaration"
    10  	_Tag_name_2 = "LabelLexDwarfBlock"
    11  	_Tag_name_3 = "Member"
    12  	_Tag_name_4 = "PointerTypeReferenceTypeCompileUnitStringTypeStructType"
    13  	_Tag_name_5 = "SubroutineTypeTypedefUnionTypeUnspecifiedParametersVariantCommonDwarfBlockCommonInclusionInheritanceInlinedSubroutineModulePtrToMemberTypeSetTypeSubrangeTypeWithStmtAccessDeclarationBaseTypeCatchDwarfBlockConstTypeConstantEnumeratorFileTypeFriendNamelistNamelistItemPackedTypeSubprogramTemplateTypeParameterTemplateValueParameterThrownTypeTryDwarfBlockVariantPartVariableVolatileTypeDwarfProcedureRestrictTypeInterfaceTypeNamespaceImportedModuleUnspecifiedTypePartialUnitImportedUnitMutableTypeConditionSharedTypeTypeUnitRvalueReferenceTypeTemplateAlias"
    14  )
    15  
    16  var (
    17  	_Tag_index_0 = [...]uint8{0, 9, 18, 28, 43, 58}
    18  	_Tag_index_2 = [...]uint8{0, 5, 18}
    19  	_Tag_index_4 = [...]uint8{0, 11, 24, 35, 45, 55}
    20  	_Tag_index_5 = [...]uint16{0, 14, 21, 30, 51, 58, 74, 89, 100, 117, 123, 138, 145, 157, 165, 182, 190, 205, 214, 222, 232, 240, 246, 254, 266, 276, 286, 307, 329, 339, 352, 363, 371, 383, 397, 409, 422, 431, 445, 460, 471, 483, 494, 503, 513, 521, 540, 553}
    21  )
    22  
    23  func (i Tag) String() string {
    24  	switch {
    25  	case 1 <= i && i <= 5:
    26  		i -= 1
    27  		return _Tag_name_0[_Tag_index_0[i]:_Tag_index_0[i+1]]
    28  	case i == 8:
    29  		return _Tag_name_1
    30  	case 10 <= i && i <= 11:
    31  		i -= 10
    32  		return _Tag_name_2[_Tag_index_2[i]:_Tag_index_2[i+1]]
    33  	case i == 13:
    34  		return _Tag_name_3
    35  	case 15 <= i && i <= 19:
    36  		i -= 15
    37  		return _Tag_name_4[_Tag_index_4[i]:_Tag_index_4[i+1]]
    38  	case 21 <= i && i <= 67:
    39  		i -= 21
    40  		return _Tag_name_5[_Tag_index_5[i]:_Tag_index_5[i+1]]
    41  	default:
    42  		return "Tag(" + strconv.FormatInt(int64(i), 10) + ")"
    43  	}
    44  }
    45  

View as plain text