- Sort Score
- Result 10 results
- Languages All
Results 1 - 10 of 258 for positioner (0.19 sec)
-
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) -
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) -
src/go/types/badlinkname.go
// - github.com/goplus/gox // // Do not remove or change the type signature. // See go.dev/issue/67401. // //go:linkname badlinkname_Checker_infer go/types.(*Checker).infer
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Wed May 29 16:25:21 UTC 2024 - 702 bytes - Viewed (0) -
src/go/types/version.go
) // allowVersion reports whether the current package at the given position // is allowed to use version v. If the position is unknown, the specified // module version (Config.GoVersion) is used. If that version is invalid, // allowVersion returns true. func (check *Checker) allowVersion(at positioner, v goVersion) bool { fileVersion := check.conf.GoVersion if pos := at.Pos(); pos.IsValid() {
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Thu Mar 14 23:12:40 UTC 2024 - 3.2K bytes - Viewed (0) -
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) -
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) -
src/cmd/cgo/internal/testerrors/argposition_test.go
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Fri May 19 01:37:31 UTC 2023 - 3.1K bytes - Viewed (0) -
src/go/token/example_test.go
// Get the filename, line, and column back via the file set. // We get both the relative and absolute position. // The relative position is relative to the last line directive. // The absolute position is the exact position in the source. pos := decl.Pos() relPosition := fset.Position(pos) absPosition := fset.PositionFor(pos, false) // Either a FuncDecl or GenDecl, since we exit on error. kind := "func"
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Mon Oct 09 22:09:31 UTC 2023 - 1.7K bytes - Viewed (0) -
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) -
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)