mirror of
https://github.com/golang/go
synced 2024-11-21 21:24:45 -07:00
exp/norm: generate trie struct in triegen.go for better encapsulation.
R=r, r CC=golang-dev https://golang.org/cl/4837071
This commit is contained in:
parent
8d19d6bb39
commit
58a92bd1ef
File diff suppressed because it is too large
Load Diff
@ -6,7 +6,7 @@ import (
|
||||
)
|
||||
|
||||
// Test data is located in triedata_test.go, generated by maketesttables.
|
||||
var testdata = &trie{testdataLookup[:], testdataValues[:]}
|
||||
var testdata = testdataTrie
|
||||
|
||||
// Test cases for illegal runes.
|
||||
type trietest struct {
|
||||
|
@ -59,3 +59,5 @@ var testdataLookup = [640]uint8{
|
||||
// Block 0x9, offset 0x240
|
||||
0x24f: 0x08,
|
||||
}
|
||||
|
||||
var testdataTrie = trie{testdataLookup[:], testdataValues[:]}
|
||||
|
@ -206,5 +206,6 @@ func (t *trieNode) printTables(name string) int {
|
||||
printLookupBlock(i, index.lookupBlocks[i], 0x80)
|
||||
}
|
||||
fmt.Print("\n}\n\n")
|
||||
fmt.Printf("var %sTrie = trie{ %sLookup[:], %sValues[:] }\n\n", name, name, name)
|
||||
return nv*2 + ni
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user