- Sort Score
- Result 10 results
- Languages All
Results 1 - 10 of 852 for positioner (0.17 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/generate_test.go
case *ast.FuncDecl: if n.Name.Name == "infer" { // rewrite (pos token.Pos, ...) to (posn positioner, ...) par := n.Type.Params.List[0] if len(par.Names) == 1 && par.Names[0].Name == "pos" { par.Names[0] = newIdent(par.Names[0].Pos(), "posn") par.Type = newIdent(par.Type.Pos(), "positioner") return true } } case *ast.CallExpr:
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Thu May 23 03:01:18 UTC 2024 - 16.5K bytes - Viewed (0) -
src/go/types/check.go
pos token.Pos // if valid, identifiers are looked up as if at position pos (used by Eval) iota constant.Value // value of iota in a constant declaration; nil otherwise errpos positioner // if set, identifier position of a constant with inherited initializer inTParamList bool // set if inside a type parameter list
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Thu May 30 19:19:55 UTC 2024 - 23.1K 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/go/types/assignments.go
return } } check.errorf(rhs0, WrongAssignCount, "assignment mismatch: %s but %s", vars, vals) } func (check *Checker) returnError(at positioner, lhs []*Var, rhs []*operand) { l, r := len(lhs), len(rhs) qualifier := "not enough" if r > l { at = rhs[l] // report at first extra value qualifier = "too many" } else if r > 0 {
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Wed Apr 03 18:48:38 UTC 2024 - 16.4K bytes - Viewed (0) -
src/go/types/call.go
// and x.mode is set to invalid. func (check *Checker) funcInst(T *target, pos token.Pos, x *operand, ix *typeparams.IndexExpr, infer bool) ([]Type, []ast.Expr) { assert(T != nil || ix != nil) var instErrPos positioner if ix != nil { instErrPos = inNode(ix.Orig, ix.Lbrack) x.expr = ix.Orig // if we don't have an index expression, keep the existing expression of x } else { instErrPos = atPos(pos) }
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Thu May 30 19:19:55 UTC 2024 - 33.5K bytes - Viewed (0) -
src/go/types/resolver.go
file := check.files[fileNo] if pos := file.Pos(); pos.IsValid() { return check.fset.File(pos).Name() } return fmt.Sprintf("file[%d]", fileNo) } func (check *Checker) importPackage(at positioner, path, dir string) *Package { // If we already have a package for the given (path, dir) // pair, use it instead of doing a full import. // Checker.impMap only caches packages that are marked Complete
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Fri May 17 16:22:59 UTC 2024 - 26.1K bytes - Viewed (0)