- Sort Score
- Result 10 results
- Languages All
Results 1 - 10 of 350 for positioner (0.16 sec)
-
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/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) -
src/go/types/infer.go
// type parameter. Otherwise the result is nil. Errors are reported through the err parameter. // Note: infer may fail (return nil) due to invalid args operands without reporting additional errors. func (check *Checker) infer(posn positioner, tparams []*TypeParam, targs []Type, params *Tuple, args []*operand, reverse bool, err *error_) (inferred []Type) { // Don't verify result conditions if there's no error handler installed:
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Fri May 24 13:54:20 UTC 2024 - 26.5K bytes - Viewed (0) -
src/go/types/decl.go
var x operand if init != nil { if inherited { // The initialization expression is inherited from a previous // constant declaration, and (error) positions refer to that // expression and not the current constant declaration. Use // the constant identifier position for any errors during // init expression evaluation since that is all we have // (see issues go.dev/issue/42991, go.dev/issue/42992).
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Thu May 30 19:19:55 UTC 2024 - 31K bytes - Viewed (0) -
src/go/token/position.go
func (s *FileSet) PositionFor(p Pos, adjusted bool) (pos Position) { if p != NoPos { if f := s.file(p); f != nil { return f.position(p, adjusted) } } return } // Position converts a [Pos] p in the fileset into a Position value. // Calling s.Position(p) is equivalent to calling s.PositionFor(p, true). func (s *FileSet) Position(p Pos) (pos Position) { return s.PositionFor(p, true) }
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Thu May 23 01:00:11 UTC 2024 - 19.7K bytes - Viewed (0) -
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) -
src/go/token/position_test.go
f.SetLinesForContent(src) // verify position info for i, offs := range f.lines { got1 := f.PositionFor(f.Pos(offs), false) got2 := f.PositionFor(f.Pos(offs), true) got3 := f.Position(f.Pos(offs)) want := Position{filename, offs, i + 1, 1} checkPos(t, "1. PositionFor unadjusted", got1, want) checkPos(t, "1. PositionFor adjusted", got2, want) checkPos(t, "1. Position", got3, want) }
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Wed Jan 31 20:26:14 UTC 2024 - 14.3K bytes - Viewed (0)