This commit is contained in:
gobwas 2016-02-24 11:19:54 +03:00
parent 3dc92f7b54
commit f884dfeb2e
2 changed files with 9 additions and 15 deletions

View File

@ -37,5 +37,5 @@ func (self Any) Len() int {
}
func (self Any) String() string {
return fmt.Sprintf("<any:![%s]>", self.Separators)
return fmt.Sprintf("<any:![%s]>", string(self.Separators))
}

View File

@ -25,10 +25,6 @@ const (
cacheToAndHigherIndex = 1023
)
var asciiTable [128]byte
var segmentsByRuneLength [5][]int
var (
segments0 = []int{0}
segments1 = []int{1}
@ -37,6 +33,14 @@ var (
segments4 = []int{4}
)
var segmentsByRuneLength [5][]int = [5][]int{
0: segments0,
1: segments1,
2: segments2,
3: segments3,
4: segments4,
}
const (
asciiLo = 0
asciiHi = 127
@ -50,16 +54,6 @@ func init() {
}}
}(i)
}
segmentsByRuneLength[0] = segments0
segmentsByRuneLength[1] = segments1
segmentsByRuneLength[2] = segments2
segmentsByRuneLength[3] = segments3
segmentsByRuneLength[4] = segments4
for i := 0; i <= 127; i++ {
asciiTable[i] = 1
}
}
func getTableIndex(c int) int {