- Sort Score
- Result 10 results
- Languages All
Results 1 - 10 of 394 for Positions (0.25 sec)
-
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.AddLine(offs) f.AddLineInfo(offs, "bar", 42) } // verify positions for all offsets for offs := 0; offs <= f.Size(); offs++ { p := f.Pos(offs) _, col := linecol(lines, offs) msg := fmt.Sprintf("%s (offs = %d, p = %d)", f.Name(), offs, p) checkPos(t, msg, f.Position(f.Pos(offs)), Position{"bar", offs, 42, col}) checkPos(t, msg, fset.Position(p), Position{"bar", offs, 42, col}) } } func TestFiles(t *testing.T) {
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Wed Jan 31 20:26:14 UTC 2024 - 14.3K bytes - Viewed (0) -
src/go/printer/printer.go
// Positions // The out position differs from the pos position when the result // formatting differs from the source formatting (in the amount of // white space). If there's a difference and SourcePos is set in // ConfigMode, //line directives are used in the output to restore // original source positions for a reader. pos token.Position // current position in AST (source) space
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/internal/pkgbits/decoder.go
// elemEnds stores the byte-offset end positions of element // bitstreams within elemData. // // For example, element I's bitstream data starts at elemEnds[I-1] // (or 0, if I==0) and ends at elemEnds[I]. // // Note: elemEnds is indexed by absolute indices, not // section-relative indices. elemEnds []uint32 // elemEndsEnds stores the index-offset end positions of relocation // sections within elemEnds. //
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Tue Sep 27 20:58:46 UTC 2022 - 13.2K bytes - Viewed (0) -
src/cmd/vendor/golang.org/x/build/relnote/relnote.go
} // addLines adds n lines to the position of b. // n can be negative. func addLines(b md.Block, n int) { pos := position(b) pos.StartLine += n pos.EndLine += n } func position(b md.Block) *md.Position { switch b := b.(type) { case *md.Heading: return &b.Position case *md.Text: return &b.Position case *md.CodeBlock: return &b.Position case *md.HTMLBlock: return &b.Position
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Tue Jun 04 16:19:04 UTC 2024 - 12.7K bytes - Viewed (0) -
src/go/token/position.go
// //line comments; otherwise those comments are ignored. // p must be a Pos value in f or NoPos. func (f *File) PositionFor(p Pos, adjusted bool) (pos Position) { if p != NoPos { pos = f.position(p, adjusted) } return } // Position returns the Position value for the given file position p. // If p is out of bounds, it is adjusted to match the File.Offset behavior.
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/index/suffixarray/sais.go
// By scanning backward, we can keep track of whether the current // position is type-S or type-L according to the usual definition: // // - position len(text) is type S with text[len(text)] == -1 (the sentinel) // - position i is type S if text[i] < text[i+1], or if text[i] == text[i+1] && i+1 is type S. // - position i is type L if text[i] > text[i+1], or if text[i] == text[i+1] && i+1 is type L. //
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Mon Mar 18 23:57:18 UTC 2024 - 32.4K bytes - Viewed (0) -
tensorflow/cc/framework/gradient_checker.cc
} for (int i = 0; i < y_num; i++) { feed_list.insert({dys[i], dy_datas[i]}); } // x_stride and y_stride are used to calculate the correct jacobian row and // column position for a pair of elements at positions r, c within the x and y // tensors respectively. const int x_stride = JacobianStride<X_T>::value; const int y_stride = JacobianStride<Y_T>::value; ClientSession session(scope);
Registered: Sun Jun 16 05:45:23 UTC 2024 - Last Modified: Sat Apr 13 05:57:22 UTC 2024 - 18.2K bytes - Viewed (0) -
src/go/doc/example.go
imps := make([]*ast.ImportSpec, len(origImps)) copy(imps, origImps) // Assume the imports are sorted by position. slices.SortFunc(imps, func(a, b *ast.ImportSpec) int { return cmp.Compare(a.Pos(), b.Pos()) }) // Assume gofmt has been applied, so there is a blank line between adjacent imps // if and only if they are more than 2 positions apart (newline, tab). var groupStarts []*ast.ImportSpec prevEnd := token.Pos(-2)
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Thu May 23 01:00:11 UTC 2024 - 21.4K bytes - Viewed (0) -
src/cmd/compile/internal/ssa/block.go
phielimValue(phi) } // LackingPos indicates whether b is a block whose position should be inherited // from its successors. This is true if all the values within it have unreliable positions // and if it is "plain", meaning that there is no control flow that is also very likely // to correspond to a well-understood source position. func (b *Block) LackingPos() bool {
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Wed May 15 15:44:14 UTC 2024 - 12.2K bytes - Viewed (0)