Search Options

Results per page
Sort
Preferred Languages
Advance

Results 41 - 50 of 732 for positioner (0.14 sec)

  1. src/go/types/check_test.go

    		index := -1 // index of matching error
    		var delta int
    		for _, i := range indices {
    			if d := absDiff(gotPos.Column, errList[i].col); index < 0 || d < delta {
    				index, delta = i, d
    			}
    		}
    
    		// The closest column position must be within expected colDelta.
    		const colDelta = 0 // go/types errors are positioned correctly
    		if delta > colDelta {
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Wed May 22 19:45:33 UTC 2024
    - 14.1K bytes
    - Viewed (0)
  2. src/go/parser/resolver_test.go

    )
    
    // TestResolution checks that identifiers are resolved to the declarations
    // annotated in the source, by comparing the positions of the resulting
    // Ident.Obj.Decl to positions marked in the source via special comments.
    //
    // In the test source, any comment prefixed with '=' or '@' (or both) marks the
    // previous token position as the declaration ('=') or a use ('@') of an
    // identifier. The text following '=' and '@' in the comment string is the
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Fri Aug 19 17:46:07 UTC 2022
    - 4.9K bytes
    - Viewed (0)
  3. src/index/suffixarray/sais.go

    	// By scanning backward, we can keep track of whether the current
    	// position is type-S or type-L according to the usual definition:
    	//
    	//	- position len(text) is type S with text[len(text)] == -1 (the sentinel)
    	//	- position i is type S if text[i] < text[i+1], or if text[i] == text[i+1] && i+1 is type S.
    	//	- position i is type L if text[i] > text[i+1], or if text[i] == text[i+1] && i+1 is type L.
    	//
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Mon Mar 18 23:57:18 UTC 2024
    - 32.4K bytes
    - Viewed (0)
  4. src/go/doc/example.go

    	imps := make([]*ast.ImportSpec, len(origImps))
    	copy(imps, origImps)
    	// Assume the imports are sorted by position.
    	slices.SortFunc(imps, func(a, b *ast.ImportSpec) int {
    		return cmp.Compare(a.Pos(), b.Pos())
    	})
    	// Assume gofmt has been applied, so there is a blank line between adjacent imps
    	// if and only if they are more than 2 positions apart (newline, tab).
    	var groupStarts []*ast.ImportSpec
    	prevEnd := token.Pos(-2)
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu May 23 01:00:11 UTC 2024
    - 21.4K bytes
    - Viewed (0)
  5. src/go/internal/gcimporter/support.go

    func (s *fakeFileSet) pos(file string, line, column int) token.Pos {
    	// TODO(mdempsky): Make use of column.
    
    	// Since we don't know the set of needed file positions, we reserve
    	// maxlines positions per file. We delay calling token.File.SetLines until
    	// all positions have been calculated (by way of fakeFileSet.setLines), so
    	// that we can avoid setting unnecessary lines. See also golang/go#46586.
    	f := s.files[file]
    	if f == nil {
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Tue May 07 20:08:23 UTC 2024
    - 4.1K bytes
    - Viewed (0)
  6. src/cmd/gofmt/rewrite.go

    		if isWildcard(name) {
    			if old, ok := m[name]; ok {
    				return subst(nil, old, reflect.Value{})
    			}
    		}
    	}
    
    	if pos.IsValid() && pattern.Type() == positionType {
    		// use new position only if old position was valid in the first place
    		if old := pattern.Interface().(token.Pos); !old.IsValid() {
    			return pattern
    		}
    		return pos
    	}
    
    	// Otherwise copy.
    	switch p := pattern; p.Kind() {
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu Jul 27 22:07:13 UTC 2023
    - 8.1K bytes
    - Viewed (0)
  7. src/go/types/example_test.go

    	for id, obj := range info.Uses {
    		posn := fset.Position(id.Pos())
    		lineCol := fmt.Sprintf("%d:%d", posn.Line, posn.Column)
    		usesByObj[obj] = append(usesByObj[obj], lineCol)
    	}
    	var items []string
    	for obj, uses := range usesByObj {
    		slices.Sort(uses)
    		item := fmt.Sprintf("%s:\n  defined at %s\n  used at %s",
    			types.ObjectString(obj, types.RelativeTo(pkg)),
    			fset.Position(obj.Pos()),
    			strings.Join(uses, ", "))
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu May 23 01:00:11 UTC 2024
    - 8.9K bytes
    - Viewed (0)
  8. src/fmt/errors_test.go

    	}, {
    		err:        fmt.Errorf("%s %w %v", "prefix", wrapped, "suffix"),
    		wantText:   "prefix inner error suffix",
    		wantUnwrap: wrapped,
    	}, {
    		err:        fmt.Errorf("%[2]s: %[1]w", wrapped, "positional verb"),
    		wantText:   "positional verb: inner error",
    		wantUnwrap: wrapped,
    	}, {
    		err:      fmt.Errorf("%v", wrapped),
    		wantText: "inner error",
    	}, {
    		err:      fmt.Errorf("added context: %v", wrapped),
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu Sep 29 18:40:40 UTC 2022
    - 3.6K bytes
    - Viewed (0)
  9. src/encoding/csv/reader.go

    }
    
    // InputOffset returns the input stream byte offset of the current reader
    // position. The offset gives the location of the end of the most recently
    // read row and the beginning of the next row.
    func (r *Reader) InputOffset() int64 {
    	return r.offset
    }
    
    // pos holds the position of a field in the current line.
    type position struct {
    	line, col int
    }
    
    // ReadAll reads all the remaining records from r.
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Mon May 13 21:32:28 UTC 2024
    - 14.2K bytes
    - Viewed (0)
  10. platforms/core-configuration/declarative-dsl-core/src/test/kotlin/org/gradle/internal/declarativedsl/parsing/BasicParsingTest.kt

                        FunctionArgument.Positional [indexes: 2..3, line/column: 1/3..1/4, file: test] (
                            expr = IntLiteral [indexes: 2..3, line/column: 1/3..1/4, file: test] (1)
                        )
                        FunctionArgument.Positional [indexes: 5..6, line/column: 1/6..1/7, file: test] (
                            expr = PropertyAccess [indexes: 5..6, line/column: 1/6..1/7, file: test] (
    Registered: Wed Jun 12 18:38:38 UTC 2024
    - Last Modified: Tue May 14 22:06:18 UTC 2024
    - 19.1K bytes
    - Viewed (0)
Back to top