Commit 58a92bd1 authored by Marcel van Lohuizen's avatar Marcel van Lohuizen

exp/norm: generate trie struct in triegen.go for better encapsulation.

R=r, r
CC=golang-dev
https://golang.org/cl/4837071
parent 8d19d6bb
This source diff could not be displayed because it is too large. You can view the blob instead.
......@@ -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
}
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