File: relpos_string.go

package info (click to toggle)
golang-github-cue-lang-cue 0.14.2-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 19,644 kB
  • sloc: makefile: 20; sh: 15
file content (28 lines) | stat: -rw-r--r-- 724 bytes parent folder | download | duplicates (2)
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
// Code generated by "stringer -type=RelPos -linecomment"; DO NOT EDIT.

package token

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[NoRelPos-0]
	_ = x[Elided-1]
	_ = x[NoSpace-2]
	_ = x[Blank-3]
	_ = x[Newline-4]
	_ = x[NewSection-5]
}

const _RelPos_name = "invalidelidednospaceblanknewlinesection"

var _RelPos_index = [...]uint8{0, 7, 13, 20, 25, 32, 39}

func (i RelPos) String() string {
	if i < 0 || i >= RelPos(len(_RelPos_index)-1) {
		return "RelPos(" + strconv.FormatInt(int64(i), 10) + ")"
	}
	return _RelPos_name[_RelPos_index[i]:_RelPos_index[i+1]]
}