- Sort Score
- Result 10 results
- Languages All
Results 1 - 10 of 71 for posFor (0.1 sec)
-
src/go/printer/printer.go
var last *ast.Comment for p.commentBefore(next) { list := p.comment.List changed := false if p.lastTok != token.IMPORT && // do not rewrite cgo's import "C" comments p.posFor(p.comment.Pos()).Column == 1 && p.posFor(p.comment.End()+1) == next { // Unindented comment abutting next token position: // a top-level doc comment. list = formatDocComment(list) changed = true
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Thu Oct 19 12:02:03 UTC 2023 - 41.6K bytes - Viewed (0) -
src/go/printer/nodes.go
if len(list) == 0 { if isIncomplete { prev := p.posFor(prev0) next := p.posFor(next0) if prev.IsValid() && prev.Line == next.Line { p.print("/* " + filteredMsg + " */") } else { p.print(newline) p.print(indent, "// "+filteredMsg, unindent, newline) } } return } prev := p.posFor(prev0) next := p.posFor(next0) line := p.lineFor(list[0].Pos())
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Tue Oct 17 18:53:17 UTC 2023 - 52.6K bytes - Viewed (0) -
src/cmd/compile/internal/ir/mini.go
// instead of implementing Op itself. type miniNode struct { pos src.XPos // uint32 op Op // uint8 bits bitset8 esc uint16 } // posOr returns pos if known, or else n.pos. // For use in DeepCopy. func (n *miniNode) posOr(pos src.XPos) src.XPos { if pos.IsKnown() { return pos } return n.pos } // op can be read, but not written.
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Wed Aug 31 22:09:44 UTC 2022 - 2.8K bytes - Viewed (0) -
src/errors/wrap_test.go
var poserPathErr = &fs.PathError{Op: "poser"} func (p *poser) Error() string { return p.msg } func (p *poser) Is(err error) bool { return p.f(err) } func (p *poser) As(err any) bool { switch x := err.(type) { case **poser: *x = p case *errorT: *x = errorT{"poser"} case **fs.PathError: *x = poserPathErr default: return false } return true } func TestAs(t *testing.T) { var errT errorT
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Wed Apr 03 22:49:49 UTC 2024 - 6K bytes - Viewed (0) -
src/cmd/compile/internal/types2/errors.go
invalidOp = "invalid operation: " ) // The poser interface is used to extract the position of type-checker errors. type poser interface { Pos() syntax.Pos } func (check *Checker) error(at poser, code Code, msg string) { err := check.newError(code) err.addf(at, "%s", msg) err.report() } func (check *Checker) errorf(at poser, code Code, format string, args ...any) { err := check.newError(code)
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Thu Feb 29 22:06:18 UTC 2024 - 6.6K bytes - Viewed (0) -
src/cmd/compile/internal/types2/util.go
func hasDots(call *syntax.CallExpr) bool { return call.HasDots } // dddErrPos returns the node (poser) for reporting an invalid ... use in a call. func dddErrPos(call *syntax.CallExpr) *syntax.CallExpr { // TODO(gri) should use "..." instead of call position return call } // argErrPos returns the node (poser) for reporting an invalid argument count. func argErrPos(call *syntax.CallExpr) *syntax.CallExpr { return call }
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Thu May 23 03:01:18 UTC 2024 - 2.1K bytes - Viewed (0) -
src/cmd/compile/internal/noder/posmap.go
type posMap struct { bases map[*syntax.PosBase]*src.PosBase cache struct { last *syntax.PosBase base *src.PosBase } } type poser interface{ Pos() syntax.Pos } type ender interface{ End() syntax.Pos } func (m *posMap) pos(p poser) src.XPos { return m.makeXPos(p.Pos()) } func (m *posMap) end(p ender) src.XPos { return m.makeXPos(p.End()) } func (m *posMap) makeXPos(pos syntax.Pos) src.XPos {
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Fri Jan 27 03:43:35 UTC 2023 - 1.8K bytes - Viewed (0) -
src/cmd/compile/internal/types2/version.go
// 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 poser, v goVersion) bool { fileVersion := check.conf.GoVersion if pos := at.Pos(); pos.IsKnown() { fileVersion = check.versions[pos.FileBase()] } // We need asGoVersion (which calls version.Lang) below
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Mon May 20 20:44:57 UTC 2024 - 2.4K bytes - Viewed (0) -
src/database/sql/fakedb_test.go
} if rc.closed { return errors.New("fakedb: cursor is closed") } rc.touchMem() rc.posRow++ if rc.posRow == rc.errPos { return rc.err } if rc.posRow >= len(rc.rows[rc.posSet]) { return io.EOF // per interface spec } for i, v := range rc.rows[rc.posSet][rc.posRow].cols { // TODO(bradfitz): convert to subset types? naah, I // think the subset types should only be input to
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Mon Apr 01 12:38:07 UTC 2024 - 30.3K bytes - Viewed (0) -
src/runtime/os_openbsd_mips64.go
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Tue Dec 05 20:34:30 UTC 2023 - 329 bytes - Viewed (0)