Home | History | Annotate | Download | only in vet

Lines Matching defs:Span

59 // Span stores the minimum range of byte positions in the file in which a
63 // shadowing variable is declared within the span of the shadowed variable.
69 // One wrinkle: A "naked return" is a silent use of a variable that the Span
79 type Span struct {
84 // contains reports whether the position is inside the span.
85 func (s Span) contains(pos token.Pos) bool {
89 // growSpan expands the span for the object to contain the instance represented
97 span, ok := pkg.spans[obj]
99 if span.min > pos {
100 span.min = pos
102 if span.max < end {
103 span.max = end
106 span = Span{pos, end}
108 pkg.spans[obj] = span
231 // Don't complain if the span of validity of the shadowed identifier doesn't include
233 span, ok := f.pkg.spans[shadowed]
238 if !span.contains(ident.Pos()) {