Search Options

Results per page
Sort
Preferred Languages
Advance

Results 31 - 40 of 708 for positioned (0.16 sec)

  1. src/cmd/vendor/golang.org/x/tools/internal/typesinternal/types.go

    	*(*bool)(addr) = true
    
    	return true
    }
    
    // ReadGo116ErrorData extracts additional information from types.Error values
    // generated by Go version 1.16 and later: the error code, start position, and
    // end position. If all positions are valid, start <= err.Pos <= end.
    //
    // If the data could not be read, the final result parameter will be false.
    func ReadGo116ErrorData(err types.Error) (code ErrorCode, start, end token.Pos, ok bool) {
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Tue Apr 02 02:20:05 UTC 2024
    - 1.4K bytes
    - Viewed (0)
  2. src/go/scanner/example_test.go

    	// src is the input that we want to tokenize.
    	src := []byte("cos(x) + 1i*sin(x) // Euler")
    
    	// Initialize the scanner.
    	var s scanner.Scanner
    	fset := token.NewFileSet()                      // positions are relative to fset
    	file := fset.AddFile("", fset.Base(), len(src)) // register input "file"
    	s.Init(file, src, nil /* no error handler */, scanner.ScanComments)
    
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Tue Sep 27 19:47:49 UTC 2022
    - 1K bytes
    - Viewed (0)
  3. src/index/suffixarray/sais2.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
    - 52.3K bytes
    - Viewed (0)
  4. src/cmd/vendor/golang.org/x/build/relnote/relnote.go

    }
    
    // addLines adds n lines to the position of b.
    // n can be negative.
    func addLines(b md.Block, n int) {
    	pos := position(b)
    	pos.StartLine += n
    	pos.EndLine += n
    }
    
    func position(b md.Block) *md.Position {
    	switch b := b.(type) {
    	case *md.Heading:
    		return &b.Position
    	case *md.Text:
    		return &b.Position
    	case *md.CodeBlock:
    		return &b.Position
    	case *md.HTMLBlock:
    		return &b.Position
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Tue Jun 04 16:19:04 UTC 2024
    - 12.7K bytes
    - Viewed (0)
  5. src/go/importer/importer_test.go

    			t.Fatal(err)
    		}
    		if pkg.Path() != thePackage {
    			t.Fatalf("Path() = %q, want %q", pkg.Path(), thePackage)
    		}
    
    		// Check that the fileset positions are accurate.
    		// https://github.com/golang/go#28995
    		mathBigInt := pkg.Scope().Lookup("Int")
    		posn := fset.Position(mathBigInt.Pos()) // "$GOROOT/src/math/big/int.go:25:1"
    		filename := strings.Replace(posn.Filename, "$GOROOT", testenv.GOROOT(t), 1)
    		data, err := os.ReadFile(filename)
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Wed Jan 25 21:16:32 UTC 2023
    - 2.8K bytes
    - Viewed (0)
  6. src/encoding/csv/reader_test.go

    		switch r {
    		case '\n':
    			line++
    			col = 1
    			buf = append(buf, '\n')
    		case '§':
    			if len(positions) == 0 {
    				positions = append(positions, [][2]int{})
    			}
    			positions[len(positions)-1] = append(positions[len(positions)-1], [2]int{line, col})
    		case '¶':
    			positions = append(positions, [][2]int{})
    			recNum++
    		case '∑':
    			errPositions[recNum] = [2]int{line, col}
    		default:
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Sat May 14 04:25:13 UTC 2022
    - 19.1K bytes
    - Viewed (0)
  7. cmd/httprange.go

    		if offsetBeginString[0] == '+' {
    			return nil, fmt.Errorf("Byte position ('%s') must not have a sign", offsetBeginString)
    		} else if offsetBegin, err = strconv.ParseInt(offsetBeginString, 10, 64); err != nil {
    			return nil, fmt.Errorf("'%s' does not have a valid first byte position value", rangeString)
    		} else if offsetBegin < 0 {
    			return nil, fmt.Errorf("First byte position is negative ('%d')", offsetBegin)
    		}
    	}
    
    Registered: Sun Jun 16 00:44:34 UTC 2024
    - Last Modified: Thu May 09 08:44:07 UTC 2024
    - 5.9K bytes
    - Viewed (0)
  8. src/vendor/golang.org/x/text/unicode/bidi/bidi.go

    // The direction may be LeftToRight, RightToLeft, Mixed, or Neutral.
    func (p *Paragraph) Direction() Direction {
    	return p.o.Direction()
    }
    
    // TODO: what happens if the position is > len(input)? This should return an error.
    
    // RunAt reports the Run at the given position of the input text.
    //
    // This method can be used for computing line breaks on paragraphs.
    func (p *Paragraph) RunAt(pos int) Run {
    	c := 0
    	runNumber := 0
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Mon Mar 15 19:02:39 UTC 2021
    - 10.3K bytes
    - Viewed (0)
  9. src/go/types/interface.go

    			}
    			continue // ignore
    		}
    
    		// The go/parser doesn't accept method type parameters but an ast.FuncType may have them.
    		if sig.tparams != nil {
    			var at positioner = f.Type
    			if ftyp, _ := f.Type.(*ast.FuncType); ftyp != nil && ftyp.TypeParams != nil {
    				at = ftyp.TypeParams
    			}
    			check.error(at, InvalidSyntaxTree, "methods cannot have type parameters")
    		}
    
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu Nov 09 17:24:42 UTC 2023
    - 8.1K bytes
    - Viewed (0)
  10. src/go/ast/import.go

    	}
    
    	// Sort the import specs by import path.
    	// Remove duplicates, when possible without data loss.
    	// Reassign the import paths to have the same position sequence.
    	// Reassign each comment to the spec on the same line.
    	// Sort the comments by new position.
    	slices.SortFunc(specs, func(a, b Spec) int {
    		ipath := importPath(a)
    		jpath := importPath(b)
    		r := cmp.Compare(ipath, jpath)
    		if r != 0 {
    			return r
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu May 23 01:00:11 UTC 2024
    - 5.7K bytes
    - Viewed (0)
Back to top