github.com/elves/elvish@v0.15.0/pkg/parse/string.go (about) 1 // Code generated by "stringer -type=PrimaryType,RedirMode,ExprCtx -output=string.go"; DO NOT EDIT. 2 3 package parse 4 5 import "strconv" 6 7 func _() { 8 // An "invalid array index" compiler error signifies that the constant values have changed. 9 // Re-run the stringer command to generate them again. 10 var x [1]struct{} 11 _ = x[BadPrimary-0] 12 _ = x[Bareword-1] 13 _ = x[SingleQuoted-2] 14 _ = x[DoubleQuoted-3] 15 _ = x[Variable-4] 16 _ = x[Wildcard-5] 17 _ = x[Tilde-6] 18 _ = x[ExceptionCapture-7] 19 _ = x[OutputCapture-8] 20 _ = x[List-9] 21 _ = x[Lambda-10] 22 _ = x[Map-11] 23 _ = x[Braced-12] 24 } 25 26 const _PrimaryType_name = "BadPrimaryBarewordSingleQuotedDoubleQuotedVariableWildcardTildeExceptionCaptureOutputCaptureListLambdaMapBraced" 27 28 var _PrimaryType_index = [...]uint8{0, 10, 18, 30, 42, 50, 58, 63, 79, 92, 96, 102, 105, 111} 29 30 func (i PrimaryType) String() string { 31 if i < 0 || i >= PrimaryType(len(_PrimaryType_index)-1) { 32 return "PrimaryType(" + strconv.FormatInt(int64(i), 10) + ")" 33 } 34 return _PrimaryType_name[_PrimaryType_index[i]:_PrimaryType_index[i+1]] 35 } 36 func _() { 37 // An "invalid array index" compiler error signifies that the constant values have changed. 38 // Re-run the stringer command to generate them again. 39 var x [1]struct{} 40 _ = x[BadRedirMode-0] 41 _ = x[Read-1] 42 _ = x[Write-2] 43 _ = x[ReadWrite-3] 44 _ = x[Append-4] 45 } 46 47 const _RedirMode_name = "BadRedirModeReadWriteReadWriteAppend" 48 49 var _RedirMode_index = [...]uint8{0, 12, 16, 21, 30, 36} 50 51 func (i RedirMode) String() string { 52 if i < 0 || i >= RedirMode(len(_RedirMode_index)-1) { 53 return "RedirMode(" + strconv.FormatInt(int64(i), 10) + ")" 54 } 55 return _RedirMode_name[_RedirMode_index[i]:_RedirMode_index[i+1]] 56 } 57 func _() { 58 // An "invalid array index" compiler error signifies that the constant values have changed. 59 // Re-run the stringer command to generate them again. 60 var x [1]struct{} 61 _ = x[NormalExpr-0] 62 _ = x[CmdExpr-1] 63 _ = x[LHSExpr-2] 64 _ = x[BracedElemExpr-3] 65 _ = x[strictExpr-4] 66 } 67 68 const _ExprCtx_name = "NormalExprCmdExprLHSExprBracedElemExprstrictExpr" 69 70 var _ExprCtx_index = [...]uint8{0, 10, 17, 24, 38, 48} 71 72 func (i ExprCtx) String() string { 73 if i < 0 || i >= ExprCtx(len(_ExprCtx_index)-1) { 74 return "ExprCtx(" + strconv.FormatInt(int64(i), 10) + ")" 75 } 76 return _ExprCtx_name[_ExprCtx_index[i]:_ExprCtx_index[i+1]] 77 }