/
tokentype_string.go
101 lines (92 loc) · 3.21 KB
/
tokentype_string.go
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
// Code generated by "stringer -type=tokenType,tokenModifier -trimprefix=semantic"; DO NOT EDIT.
package lsp
import "strconv"
func _() {
// An "invalid array index" compiler error signifies that the constant values have changed.
// Re-run the stringer command to generate them again.
var x [1]struct{}
_ = x[semanticTypeNamespace-0]
_ = x[semanticTypeType-1]
_ = x[semanticTypeClass-2]
_ = x[semanticTypeEnum-3]
_ = x[semanticTypeInterface-4]
_ = x[semanticTypeStruct-5]
_ = x[semanticTypeTypeParameter-6]
_ = x[semanticTypeParameter-7]
_ = x[semanticTypeVariable-8]
_ = x[semanticTypeProperty-9]
_ = x[semanticTypeEnumMember-10]
_ = x[semanticTypeEvent-11]
_ = x[semanticTypeFunction-12]
_ = x[semanticTypeMethod-13]
_ = x[semanticTypeMacro-14]
_ = x[semanticTypeKeyword-15]
_ = x[semanticTypeModifier-16]
_ = x[semanticTypeComment-17]
_ = x[semanticTypeString-18]
_ = x[semanticTypeNumber-19]
_ = x[semanticTypeRegexp-20]
_ = x[semanticTypeOperator-21]
}
const _tokenType_name = "TypeNamespaceTypeTypeTypeClassTypeEnumTypeInterfaceTypeStructTypeTypeParameterTypeParameterTypeVariableTypePropertyTypeEnumMemberTypeEventTypeFunctionTypeMethodTypeMacroTypeKeywordTypeModifierTypeCommentTypeStringTypeNumberTypeRegexpTypeOperator"
var _tokenType_index = [...]uint8{0, 13, 21, 30, 38, 51, 61, 78, 91, 103, 115, 129, 138, 150, 160, 169, 180, 192, 203, 213, 223, 233, 245}
func (i tokenType) String() string {
if i >= tokenType(len(_tokenType_index)-1) {
return "tokenType(" + strconv.FormatInt(int64(i), 10) + ")"
}
return _tokenType_name[_tokenType_index[i]:_tokenType_index[i+1]]
}
func _() {
// An "invalid array index" compiler error signifies that the constant values have changed.
// Re-run the stringer command to generate them again.
var x [1]struct{}
_ = x[semanticModifierDeclaration-1]
_ = x[semanticModifierDefinition-2]
_ = x[semanticModifierReadonly-4]
_ = x[semanticModifierStatic-8]
_ = x[semanticModifierDeprecated-16]
_ = x[semanticModifierAbstract-32]
_ = x[semanticModifierAsync-64]
_ = x[semanticModifierModification-128]
_ = x[semanticModifierDocumentation-256]
_ = x[semanticModifierDefaultLibrary-512]
}
const (
_tokenModifier_name_0 = "ModifierDeclarationModifierDefinition"
_tokenModifier_name_1 = "ModifierReadonly"
_tokenModifier_name_2 = "ModifierStatic"
_tokenModifier_name_3 = "ModifierDeprecated"
_tokenModifier_name_4 = "ModifierAbstract"
_tokenModifier_name_5 = "ModifierAsync"
_tokenModifier_name_6 = "ModifierModification"
_tokenModifier_name_7 = "ModifierDocumentation"
_tokenModifier_name_8 = "ModifierDefaultLibrary"
)
var (
_tokenModifier_index_0 = [...]uint8{0, 19, 37}
)
func (i tokenModifier) String() string {
switch {
case 1 <= i && i <= 2:
i -= 1
return _tokenModifier_name_0[_tokenModifier_index_0[i]:_tokenModifier_index_0[i+1]]
case i == 4:
return _tokenModifier_name_1
case i == 8:
return _tokenModifier_name_2
case i == 16:
return _tokenModifier_name_3
case i == 32:
return _tokenModifier_name_4
case i == 64:
return _tokenModifier_name_5
case i == 128:
return _tokenModifier_name_6
case i == 256:
return _tokenModifier_name_7
case i == 512:
return _tokenModifier_name_8
default:
return "tokenModifier(" + strconv.FormatInt(int64(i), 10) + ")"
}
}