- Sort Score
- Result 10 results
- Languages All
Results 1 - 3 of 3 for RelLine (0.1 sec)
-
src/cmd/internal/src/pos_test.go
// relative info if got := pos.RelFilename(); got != test.relFilename { t.Errorf("%s: got relFilename %q; want %q", test.string, got, test.relFilename) } if got := pos.RelLine(); got != test.relLine { t.Errorf("%s: got relLine %d; want %d", test.string, got, test.relLine) } if got := pos.RelCol(); got != test.relCol { t.Errorf("%s: got relCol %d; want %d", test.string, got, test.relCol) } } }
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Mon Feb 14 23:50:26 UTC 2022 - 8.4K bytes - Viewed (0) -
src/cmd/compile/internal/syntax/pos.go
b := pos.base for b != nil && b != b.pos.base { b = b.pos.base } // b == nil || b == b.pos.base return b } func (pos Pos) RelFilename() string { return pos.base.Filename() } func (pos Pos) RelLine() uint { b := pos.base if b.Line() == 0 { // base line is unknown => relative line is unknown return 0 } return b.Line() + (pos.Line() - b.Pos().Line()) } func (pos Pos) RelCol() uint {
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/obj/line.go
// etc). func (ctxt *Link) getFileIndexAndLine(xpos src.XPos) (int, int32) { pos := ctxt.InnermostPos(xpos) if !pos.IsKnown() { pos = src.Pos{} } return pos.FileIndex(), int32(pos.RelLine())
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Fri Sep 01 15:52:41 UTC 2023 - 892 bytes - Viewed (0)