Rename String(*token.Map) to Str(*token.Map)

This commit is contained in:
Nigel Tao committed 2017-12-01 11:22:08 +11:00
1 parent 638d8eee77
commit 7601fb45ce
15 files changed
+219 -219

No files matched your search

+4 -4
View File
@@ -63,8 +63,8 @@ const (
// ID combines a Key and Flags.
type ID uint32
// String returns a string form of x.
func (x ID) String(m *Map) string { return m.ByID(x) }
// Str returns a string form of x.
func (x ID) Str(m *Map) string { return m.ByID(x) }
func (x ID) AmbiguousForm() ID { return ambiguousForms[0xFF&(x>>KeyShift)] }
func (x ID) UnaryForm() ID { return unaryForms[0xFF&(x>>KeyShift)] }
@@ -99,8 +99,8 @@ func (x ID) IsXAssociativeOp() bool { return x.Key().isXOp() && x.IsAssociativeO
// "bar"'s. QID[0] may be 0 for a plain "bar".
type QID [2]ID
// String returns a string form of x.
func (x QID) String(m *Map) string {
// Str returns a string form of x.
func (x QID) Str(m *Map) string {
if x[0] == 0 {
return m.ByID(x[1])
}