Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in
Toggle navigation
G
golang
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Commits
Issue Boards
Open sidebar
go
golang
Commits
58a92bd1
Commit
58a92bd1
authored
Aug 12, 2011
by
Marcel van Lohuizen
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
exp/norm: generate trie struct in triegen.go for better encapsulation.
R=r, r CC=golang-dev
https://golang.org/cl/4837071
parent
8d19d6bb
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
4 additions
and
1 deletion
+4
-1
tables.go
src/pkg/exp/norm/tables.go
+0
-0
trie_test.go
src/pkg/exp/norm/trie_test.go
+1
-1
triedata_test.go
src/pkg/exp/norm/triedata_test.go
+2
-0
triegen.go
src/pkg/exp/norm/triegen.go
+1
-0
No files found.
src/pkg/exp/norm/tables.go
View file @
58a92bd1
This source diff could not be displayed because it is too large. You can
view the blob
instead.
src/pkg/exp/norm/trie_test.go
View file @
58a92bd1
...
...
@@ -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
{
...
...
src/pkg/exp/norm/triedata_test.go
View file @
58a92bd1
...
...
@@ -59,3 +59,5 @@ var testdataLookup = [640]uint8{
// Block 0x9, offset 0x240
0x24f
:
0x08
,
}
var
testdataTrie
=
trie
{
testdataLookup
[
:
],
testdataValues
[
:
]}
src/pkg/exp/norm/triegen.go
View file @
58a92bd1
...
...
@@ -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
}
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment