op_string.go 692 B

1234567891011121314151617181920212223242526
  1. // Code generated by "stringer -type Op -trimprefix Op"; DO NOT EDIT.
  2. package syntax // modernc.org/regexp/syntax
  3. import "strconv"
  4. const (
  5. _Op_name_0 = "NoMatchEmptyMatchLiteralCharClassAnyCharNotNLAnyCharBeginLineEndLineBeginTextEndTextWordBoundaryNoWordBoundaryCaptureStarPlusQuestRepeatConcatAlternate"
  6. _Op_name_1 = "opPseudo"
  7. )
  8. var (
  9. _Op_index_0 = [...]uint8{0, 7, 17, 24, 33, 45, 52, 61, 68, 77, 84, 96, 110, 117, 121, 125, 130, 136, 142, 151}
  10. )
  11. func (i Op) String() string {
  12. switch {
  13. case 1 <= i && i <= 19:
  14. i -= 1
  15. return _Op_name_0[_Op_index_0[i]:_Op_index_0[i+1]]
  16. case i == 128:
  17. return _Op_name_1
  18. default:
  19. return "Op(" + strconv.FormatInt(int64(i), 10) + ")"
  20. }
  21. }