mirror of
https://github.com/golang/go.git
synced 2025-05-05 15:43:04 +00:00
tools: minor comment fixes.
LGTM=gri R=gri CC=golang-codereviews https://golang.org/cl/173170043
This commit is contained in:
parent
c05aea77a9
commit
b8d26f5b94
@ -1,4 +1,6 @@
|
||||
// The eg command performs example-based refactoring.
|
||||
// For documentation, run the command, or see Help in
|
||||
// code.google.com/p/go.tools/refactor/eg.
|
||||
package main
|
||||
|
||||
import (
|
||||
|
@ -15,6 +15,7 @@ package intsets
|
||||
|
||||
// TODO(adonovan):
|
||||
// - Add SymmetricDifference(x, y *Sparse), i.e. x ∆ y.
|
||||
// - Add SubsetOf (x∖y=∅) and Intersects (x∩y≠∅) predicates.
|
||||
// - Add InsertAll(...int), RemoveAll(...int)
|
||||
// - Add 'bool changed' results for {Intersection,Difference}With too.
|
||||
//
|
||||
@ -25,6 +26,9 @@ package intsets
|
||||
// TODO(adonovan): experiment with making the root block indirect (nil
|
||||
// iff IsEmpty). This would reduce the memory usage when empty and
|
||||
// might simplify the aliasing invariants.
|
||||
//
|
||||
// TODO(adonovan): opt: make UnionWith and Difference faster.
|
||||
// These are the hot-spots for go/pointer.
|
||||
|
||||
import (
|
||||
"bytes"
|
||||
@ -641,7 +645,7 @@ func (s *Sparse) Difference(x, y *Sparse) {
|
||||
if sum != 0 {
|
||||
sb = sb.next
|
||||
} else {
|
||||
// sb will be overrwritten or removed
|
||||
// sb will be overwritten or removed
|
||||
}
|
||||
|
||||
yb = yb.next
|
||||
|
@ -458,6 +458,7 @@ func TestFailFastOnShallowCopy(t *testing.T) {
|
||||
// -- Benchmarks -------------------------------------------------------
|
||||
|
||||
// TODO(adonovan):
|
||||
// - Add benchmarks of each method.
|
||||
// - Gather set distributions from pointer analysis.
|
||||
// - Measure memory usage.
|
||||
|
||||
|
@ -297,6 +297,7 @@ func (conf *Config) fset() *token.FileSet {
|
||||
// the Config's FileSet, which is initialized if nil.
|
||||
//
|
||||
func (conf *Config) ParseFile(filename string, src interface{}) (*ast.File, error) {
|
||||
// TODO(adonovan): use conf.build() etc like parseFiles does.
|
||||
return parser.ParseFile(conf.fset(), filename, src, conf.ParserMode)
|
||||
}
|
||||
|
||||
|
@ -465,6 +465,9 @@ func (r *describeTypeResult) display(printf printfFunc) {
|
||||
if len(r.methods) > 0 {
|
||||
printf(r.node, "Method set:")
|
||||
for _, meth := range r.methods {
|
||||
// TODO(adonovan): print these relative
|
||||
// to the owning package, not the
|
||||
// query package.
|
||||
printf(meth.Obj(), "\t%s", r.qpos.SelectionString(meth))
|
||||
}
|
||||
} else {
|
||||
|
@ -124,8 +124,8 @@ type ImplementsType struct {
|
||||
// a "what" query.
|
||||
type SyntaxNode struct {
|
||||
Description string `json:"desc"` // description of syntax tree
|
||||
Start int `json:"start"` // start offset (0-based)
|
||||
End int `json:"end"` // end offset
|
||||
Start int `json:"start"` // start byte offset, 0-based
|
||||
End int `json:"end"` // end byte offset
|
||||
}
|
||||
|
||||
// A What is the result of the "what" query, which quickly identifies
|
||||
|
Loading…
x
Reference in New Issue
Block a user