regexp/syntax.Regexp.Op (field)
77 uses
regexp/syntax (current package)
compile.go#L89: switch re.Op {
parse.go#L96: re.Op = op
parse.go#L109: if re.Op == OpCharClass && len(re.Rune) == 2 && re.Rune[0] == re.Rune[1] {
parse.go#L114: re.Op = OpLiteral
parse.go#L117: } else if re.Op == OpCharClass && len(re.Rune) == 4 &&
parse.go#L121: re.Op == OpCharClass && len(re.Rune) == 2 &&
parse.go#L131: re.Op = OpLiteral
parse.go#L160: if re1.Op != OpLiteral || re2.Op != OpLiteral || re1.Flags&FoldCase != re2.Flags&FoldCase {
parse.go#L238: if sub.Op >= opPseudo {
parse.go#L267: if re.Op == OpRepeat {
parse.go#L296: for i > 0 && p.stack[i-1].Op < opPseudo {
parse.go#L315: for i > 0 && p.stack[i-1].Op < opPseudo {
parse.go#L338: switch re.Op {
parse.go#L343: re.Op = OpAnyChar
parse.go#L348: re.Op = OpAnyCharNotNL
parse.go#L370: if sub.Op == op {
parse.go#L489: (isCharClass(first) || (first.Op == OpRepeat && first.Min == first.Max && isCharClass(first.Sub[0]))) {
parse.go#L548: if sub[max].Op < sub[j].Op || sub[max].Op == sub[j].Op && len(sub[max].Rune) < len(sub[j].Rune) {
parse.go#L574: if i+1 < len(sub) && sub[i].Op == OpEmptyMatch && sub[i+1].Op == OpEmptyMatch {
parse.go#L587: if re.Op == OpConcat && len(re.Sub) > 0 {
parse.go#L590: if re.Op != OpLiteral {
parse.go#L599: if re.Op == OpConcat && len(re.Sub) > 0 {
parse.go#L605: if sub.Op == OpEmptyMatch {
parse.go#L610: re.Op = OpEmptyMatch
parse.go#L624: if re.Op == OpLiteral {
parse.go#L627: re.Op = OpEmptyMatch
parse.go#L636: if re.Op == OpEmptyMatch {
parse.go#L639: if re.Op == OpConcat && len(re.Sub) > 0 {
parse.go#L641: if sub.Op == OpEmptyMatch {
parse.go#L653: if re.Op == OpConcat && len(re.Sub) > 0 {
parse.go#L660: re.Op = OpEmptyMatch
parse.go#L676: re := &Regexp{Op: OpLiteral}
parse.go#L1094: return re.Op == OpLiteral && len(re.Rune) == 1 ||
parse.go#L1095: re.Op == OpCharClass ||
parse.go#L1096: re.Op == OpAnyCharNotNL ||
parse.go#L1097: re.Op == OpAnyChar
parse.go#L1102: switch re.Op {
parse.go#L1139: switch dst.Op {
parse.go#L1145: dst.Op = OpAnyChar
parse.go#L1149: if src.Op == OpLiteral {
parse.go#L1159: dst.Op = OpCharClass
parse.go#L1172: if n >= 3 && p.stack[n-2].Op == opVerticalBar && isCharClass(p.stack[n-1]) && isCharClass(p.stack[n-3]) {
parse.go#L1176: if re1.Op > re3.Op {
parse.go#L1189: if re2.Op == opVerticalBar {
parse.go#L1219: if re2.Op != opLeftParen {
parse.go#L1228: re2.Op = OpCapture
regexp.go#L18: Op Op // operator
regexp.go#L67: if x.Op != y.Op {
regexp.go#L70: switch x.Op {
regexp.go#L117: switch re.Op {
regexp.go#L119: b.WriteString("<invalid op" + strconv.Itoa(int(re.Op)) + ">")
regexp.go#L193: if re.Sub[0].Op != OpEmptyMatch {
regexp.go#L198: if sub := re.Sub[0]; sub.Op > OpCapture || sub.Op == OpLiteral && len(sub.Rune) > 1 {
regexp.go#L205: switch re.Op {
regexp.go#L228: if sub.Op == OpAlternate {
regexp.go#L295: if re.Op == OpCapture {
regexp.go#L314: if re.Op == OpCapture {
simplify.go#L18: switch re.Op {
simplify.go#L39: return simplify1(re.Op, re.Flags, sub, re)
simplify.go#L45: return &Regexp{Op: OpEmptyMatch}
simplify.go#L64: nre := &Regexp{Op: OpConcat}
simplify.go#L87: prefix = &Regexp{Op: OpConcat}
simplify.go#L98: nre2 := &Regexp{Op: OpConcat}
simplify.go#L113: return &Regexp{Op: OpNoMatch}
simplify.go#L137: if sub.Op == OpEmptyMatch {
simplify.go#L141: if op == sub.Op && flags&NonGreedy == sub.Flags&NonGreedy {
simplify.go#L144: if re != nil && re.Op == op && re.Flags&NonGreedy == flags&NonGreedy && sub == re.Sub[0] {
simplify.go#L148: re = &Regexp{Op: op, Flags: flags}
regexp
regexp.go#L271: switch re.Op {
![]() |
The pages are generated with Golds v0.3.2-preview. (GOOS=darwin GOARCH=amd64) Golds is a Go 101 project developed by Tapir Liu. PR and bug reports are welcome and can be submitted to the issue list. Please follow @Go100and1 (reachable from the left QR code) to get the latest news of Golds. |