Commit ef3c0e7e authored by Russ Cox's avatar Russ Cox

regexp/syntax: remove InstLast

This was added by the one-pass CL (post Go 1.2)
so it can still be removed.

Removing because surely there will be new operations
added later, and we can't change the constant value
once we define it, so "last" is a bad concept to expose.

Nothing uses it.

LGTM=bradfitz
R=golang-codereviews, bradfitz
CC=golang-codereviews
https://golang.org/cl/81160043
parent 21b2e168
...@@ -36,7 +36,6 @@ const ( ...@@ -36,7 +36,6 @@ const (
InstRune1 InstRune1
InstRuneAny InstRuneAny
InstRuneAnyNotNL InstRuneAnyNotNL
InstLast
) )
var instOpNames = []string{ var instOpNames = []string{
...@@ -54,7 +53,7 @@ var instOpNames = []string{ ...@@ -54,7 +53,7 @@ var instOpNames = []string{
} }
func (i InstOp) String() string { func (i InstOp) String() string {
if i >= InstLast { if uint(i) >= uint(len(instOpNames)) {
return "" return ""
} }
return instOpNames[i] return instOpNames[i]
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment