Search Options

Results per page
Sort
Preferred Languages
Advance

Results 21 - 30 of 732 for positioner (0.3 sec)

  1. src/go/printer/printer.go

    }
    
    func (p *printer) posFor(pos token.Pos) token.Position {
    	// not used frequently enough to cache entire token.Position
    	return p.fset.PositionFor(pos, false /* absolute position */)
    }
    
    func (p *printer) lineFor(pos token.Pos) int {
    	if pos != p.cachedPos {
    		p.cachedPos = pos
    		p.cachedLine = p.fset.PositionFor(pos, false /* absolute position */).Line
    	}
    	return p.cachedLine
    }
    
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu Oct 19 12:02:03 UTC 2023
    - 41.6K bytes
    - Viewed (0)
  2. src/cmd/internal/src/xpos.go

    // This file implements the compressed encoding of source
    // positions using a lookup table.
    
    package src
    
    // XPos is a more compact representation of Pos.
    type XPos struct {
    	index int32
    	lico
    }
    
    // NoXPos is a valid unknown position.
    var NoXPos XPos
    
    // IsKnown reports whether the position p is known.
    // XPos.IsKnown() matches Pos.IsKnown() for corresponding
    // positions.
    func (p XPos) IsKnown() bool {
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Fri Sep 01 15:52:41 UTC 2023
    - 4.9K bytes
    - Viewed (0)
  3. 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)
  4. src/cmd/cgo/internal/testerrors/testdata/issue42580.go

    import "unsafe"
    
    // Test variables
    var (
    	checkedPointer            = []byte{1}
    	doublePointerChecked      = []byte{1}
    	singleInnerPointerChecked = []byte{1}
    )
    
    // This test checks the positions of variable identifiers.
    // Changing the positions of the test variables idents after this point will break the test.
    
    func TestSingleArgumentCast() C.int {
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Fri May 12 11:59:56 UTC 2023
    - 1.3K bytes
    - Viewed (0)
  5. src/cmd/compile/internal/types2/util.go

    package types2
    
    import (
    	"cmd/compile/internal/syntax"
    	"go/constant"
    	"go/token"
    )
    
    const isTypes2 = true
    
    // cmpPos compares the positions p and q and returns a result r as follows:
    //
    // r <  0: p is before q
    // r == 0: p and q are the same position (but may not be identical)
    // r >  0: p is after q
    //
    // If p and q are in different files, p is before q if the filename
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu May 23 03:01:18 UTC 2024
    - 2.1K bytes
    - Viewed (0)
  6. src/go/types/eval.go

    	var scope *Scope
    	if pkg == nil {
    		scope = Universe
    		pos = nopos
    	} else if !pos.IsValid() {
    		scope = pkg.scope
    	} else {
    		// The package scope extent (position information) may be
    		// incorrect (files spread across a wide range of fset
    		// positions) - ignore it and just consider its children
    		// (file scopes).
    		for _, fscope := range pkg.scope.children {
    			if scope = fscope.Innermost(pos); scope != nil {
    				break
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu Oct 19 12:02:03 UTC 2023
    - 3.1K bytes
    - Viewed (0)
  7. test/fixedbugs/issue22662b.go

    // license that can be found in the LICENSE file.
    
    // Verify the impact of line directives on error positions and position formatting.
    
    package main
    
    import (
    	"io/ioutil"
    	"log"
    	"os"
    	"os/exec"
    	"strings"
    )
    
    // Each of these tests is expected to fail (missing package clause)
    // at the position determined by the preceding line directive.
    var tests = []struct {
    	src, pos string
    }{
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu Oct 19 23:33:25 UTC 2023
    - 1.8K bytes
    - Viewed (0)
  8. 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)
  9. 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)
  10. 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)
Back to top