Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 267 for positioned (0.14 sec)

  1. src/cmd/cover/testdata/directives.go

    // Use of this source code is governed by a BSD-style
    // license that can be found in the LICENSE file.
    
    // This file is processed by the cover command, then a test verifies that
    // all compiler directives are preserved and positioned appropriately.
    
    //go:a
    
    //go:b
    package main
    
    //go:c1
    
    //go:c2
    //doc
    func c() {
    }
    
    //go:d1
    
    //doc
    //go:d2
    type d int
    
    //go:e1
    
    //doc
    //go:e2
    type (
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Mon Oct 16 23:38:38 UTC 2017
    - 502 bytes
    - Viewed (0)
  2. src/internal/types/testdata/fixedbugs/issue50782.go

    	// Field accesses are not permitted for now. Keep an error so
    	// we can find and fix this code once the situation changes.
    	return a.Value // ERROR "a.Value undefined"
    	// TODO: The error below should probably be positioned on the '-'.
    	// d := a /* ERROR "invalid operation: operator - not defined" */ .Value - b.Value
    	// return d.Abs()
    }
    
    // The second example from the issue.
    type T[P int] struct{ f P }
    
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Tue Jan 17 19:54:27 UTC 2023
    - 1.7K bytes
    - Viewed (0)
  3. src/go/internal/gcimporter/exportdata.go

    		err = fmt.Errorf("invalid archive header")
    		return
    	}
    	name = strings.TrimSpace(string(hdr[:16]))
    	return
    }
    
    // FindExportData positions the reader r at the beginning of the
    // export data section of an underlying GC-created object/archive
    // file by reading from it. The reader must be positioned at the
    // start of the file before calling this function. The hdr result
    // is the string before the export data, either "$$" or "$$B".
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu May 19 15:49:05 UTC 2022
    - 2.4K bytes
    - Viewed (0)
  4. src/internal/txtar/archive.go

    	for {
    		if name, after = isMarker(data[i:]); name != "" {
    			return data[:i], name, after
    		}
    		j := bytes.Index(data[i:], newlineMarker)
    		if j < 0 {
    			return fixNL(data), "", nil
    		}
    		i += j + 1 // positioned at start of new possible marker
    	}
    }
    
    // isMarker checks whether data begins with a file marker line.
    // If so, it returns the name from the line and the data after the line.
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Tue Sep 20 02:13:02 UTC 2022
    - 4.2K bytes
    - Viewed (0)
  5. src/cmd/pack/pack.go

    			ar.files = ar.files[:len(ar.files)-1]
    			return true
    		}
    	}
    	return false
    }
    
    // addFiles adds files to the archive. The archive is known to be
    // sane and we are positioned at the end. No attempt is made
    // to check for existing files.
    func (ar *Archive) addFiles() {
    	if len(ar.files) == 0 {
    		usage()
    	}
    	for _, file := range ar.files {
    		if verbose {
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Tue May 14 19:41:17 UTC 2024
    - 8.2K bytes
    - Viewed (0)
  6. src/compress/gzip/gunzip.go

    // In this mode, when the [Reader] reaches the end of the data stream,
    // [Reader.Read] returns [io.EOF]. The underlying reader must implement [io.ByteReader]
    // in order to be left positioned just after the gzip stream.
    // To start the next stream, call z.Reset(r) followed by z.Multistream(false).
    // If there is no next stream, z.Reset(r) will return [io.EOF].
    func (z *Reader) Multistream(ok bool) {
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Fri Oct 13 23:20:03 UTC 2023
    - 8.5K bytes
    - Viewed (0)
  7. 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)
  8. src/go/types/util.go

    // dddErrPos returns the positioner for reporting an invalid ... use in a call.
    func dddErrPos(call *ast.CallExpr) positioner { return atPos(call.Ellipsis) }
    
    // argErrPos returns positioner for reporting an invalid argument count.
    func argErrPos(call *ast.CallExpr) positioner { return inNode(call, call.Rparen) }
    
    // startPos returns the start position of node n.
    func startPos(n ast.Node) token.Pos { return n.Pos() }
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu May 23 03:01:18 UTC 2024
    - 1.7K bytes
    - Viewed (0)
  9. src/cmd/compile/internal/syntax/pos.go

    func (p position_) String() string {
    	if p.line == 0 {
    		if p.filename == "" {
    			return "<unknown position>"
    		}
    		return p.filename
    	}
    	if p.col == 0 {
    		return fmt.Sprintf("%s:%d", p.filename, p.line)
    	}
    	return fmt.Sprintf("%s:%d:%d", p.filename, p.line, p.col)
    }
    
    // A PosBase represents the base for relative position information:
    // At position pos, the relative position is filename:line:col.
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Mon May 20 20:44:57 UTC 2024
    - 5.6K bytes
    - Viewed (0)
  10. src/go/types/errors.go

    	invalidOp  = "invalid operation: "
    )
    
    // The positioner interface is used to extract the position of type-checker errors.
    type positioner interface {
    	Pos() token.Pos
    }
    
    func (check *Checker) error(at positioner, code Code, msg string) {
    	err := check.newError(code)
    	err.addf(at, "%s", msg)
    	err.report()
    }
    
    func (check *Checker) errorf(at positioner, code Code, format string, args ...any) {
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu Feb 29 22:06:18 UTC 2024
    - 8.5K bytes
    - Viewed (0)
Back to top