aboutsummaryrefslogtreecommitdiffstats
path: root/vendor/github.com/quasilyte/regex/syntax/operation_string.go
blob: b78e9ac5ded2f5cfb68901a4c7b006c2cf648e85 (plain)
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
// Code generated by "stringer -type=Operation -trimprefix=Op"; DO NOT EDIT.

package syntax

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[OpNone-0]
	_ = x[OpConcat-1]
	_ = x[OpDot-2]
	_ = x[OpAlt-3]
	_ = x[OpStar-4]
	_ = x[OpPlus-5]
	_ = x[OpQuestion-6]
	_ = x[OpNonGreedy-7]
	_ = x[OpPossessive-8]
	_ = x[OpCaret-9]
	_ = x[OpDollar-10]
	_ = x[OpLiteral-11]
	_ = x[OpChar-12]
	_ = x[OpString-13]
	_ = x[OpQuote-14]
	_ = x[OpEscapeChar-15]
	_ = x[OpEscapeMeta-16]
	_ = x[OpEscapeOctal-17]
	_ = x[OpEscapeHex-18]
	_ = x[OpEscapeUni-19]
	_ = x[OpCharClass-20]
	_ = x[OpNegCharClass-21]
	_ = x[OpCharRange-22]
	_ = x[OpPosixClass-23]
	_ = x[OpRepeat-24]
	_ = x[OpCapture-25]
	_ = x[OpNamedCapture-26]
	_ = x[OpGroup-27]
	_ = x[OpGroupWithFlags-28]
	_ = x[OpAtomicGroup-29]
	_ = x[OpPositiveLookahead-30]
	_ = x[OpNegativeLookahead-31]
	_ = x[OpPositiveLookbehind-32]
	_ = x[OpNegativeLookbehind-33]
	_ = x[OpFlagOnlyGroup-34]
	_ = x[OpComment-35]
	_ = x[OpNone2-36]
}

const _Operation_name = "NoneConcatDotAltStarPlusQuestionNonGreedyPossessiveCaretDollarLiteralCharStringQuoteEscapeCharEscapeMetaEscapeOctalEscapeHexEscapeUniCharClassNegCharClassCharRangePosixClassRepeatCaptureNamedCaptureGroupGroupWithFlagsAtomicGroupPositiveLookaheadNegativeLookaheadPositiveLookbehindNegativeLookbehindFlagOnlyGroupCommentNone2"

var _Operation_index = [...]uint16{0, 4, 10, 13, 16, 20, 24, 32, 41, 51, 56, 62, 69, 73, 79, 84, 94, 104, 115, 124, 133, 142, 154, 163, 173, 179, 186, 198, 203, 217, 228, 245, 262, 280, 298, 311, 318, 323}

func (i Operation) String() string {
	if i >= Operation(len(_Operation_index)-1) {
		return "Operation(" + strconv.FormatInt(int64(i), 10) + ")"
	}
	return _Operation_name[_Operation_index[i]:_Operation_index[i+1]]
}