Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 959 for Positions (0.14 sec)

  1. src/cmd/compile/internal/syntax/positions.go

    			return n.Pos()
    		}
    	}
    }
    
    // EndPos returns the approximate end position of n in the source.
    // For some nodes (*Name, *BasicLit) it returns the position immediately
    // following the node; for others (*BlockStmt, *SwitchStmt, etc.) it
    // returns the position of the closing '}'; and for some (*ParenExpr)
    // the returned position is the end position of the last enclosed
    // expression.
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Mon Jun 10 17:49:19 UTC 2024
    - 6.5K bytes
    - Viewed (0)
  2. 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)
  3. 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)
  4. 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)
  5. src/cmd/internal/src/pos.go

    //
    // The position base is used to determine the "relative" position, that is the
    // filename and line number relative to the position base. If the base refers
    // to the current file, there is no difference between absolute and relative
    // positions. If it refers to a //line directive, a relative position is relative
    // to that directive. A position base in turn contains the position at which it
    // was introduced in the current file.
    type Pos struct {
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Fri Sep 01 15:52:41 UTC 2023
    - 15.5K bytes
    - Viewed (0)
  6. 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)
  7. test/typeparam/issue58513.go

    // function literals to plumb sub-dictionaries appropriately.
    // However, when these expressions are inlined, we were constructing
    // the function literal bodies with the inline-adjusted positions
    // instead of the original (inline-free) positions, which could lead
    // to infinite loops when unwinding the stack.
    
    package main
    
    import "runtime"
    
    func assert[_ any]() {
    	panic(0)
    }
    
    func Assert[To any]() func() {
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Mon Feb 27 23:07:49 UTC 2023
    - 1.2K bytes
    - Viewed (0)
  8. src/cmd/cgo/internal/testerrors/argposition_test.go

    		if fdecl, ok := decl.(*ast.FuncDecl); ok {
    			ast.Walk(&Visitor{expectation, fset, t}, fdecl.Body)
    		}
    	}
    	for ident, positions := range expectation {
    		for _, position := range positions {
    			if !position.Visited {
    				t.Errorf("Position %d:%d missed for %s ident", position.Line, position.Column, ident)
    			}
    		}
    	}
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Fri May 19 01:37:31 UTC 2023
    - 3.1K bytes
    - Viewed (0)
  9. 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)
  10. 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)
Back to top