- Sort Score
- Result 10 results
- Languages All
Results 1 - 10 of 23 for posBase (0.2 sec)
-
src/cmd/compile/internal/syntax/pos.go
return &PosBase{pos, filename, sat32(line), sat32(col), trimmed} } func (base *PosBase) IsFileBase() bool { if base == nil { return false } return base.pos.base == base } func (base *PosBase) Pos() (_ Pos) { if base == nil { return } return base.pos } func (base *PosBase) Filename() string { if base == nil {
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/compile/internal/noder/posmap.go
if !pos.IsKnown() { return src.NoXPos } posBase := m.makeSrcPosBase(pos.Base()) return base.Ctxt.PosTable.XPos(src.MakePos(posBase, pos.Line(), pos.Col())) } // makeSrcPosBase translates from a *syntax.PosBase to a *src.PosBase. func (m *posMap) makeSrcPosBase(b0 *syntax.PosBase) *src.PosBase { // fast path: most likely PosBase hasn't changed if m.cache.last == b0 { return m.cache.base }
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/internal/src/pos.go
return buf.String() } // ---------------------------------------------------------------------------- // PosBase // A PosBase encodes a filename and base position. // Typically, each file and line directive introduce a PosBase. type PosBase struct { pos Pos // position at which the relative position is (line, col)
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/cmd/asm/internal/lex/slice.go
package lex import ( "text/scanner" "cmd/internal/src" ) // A Slice reads from a slice of Tokens. type Slice struct { tokens []Token base *src.PosBase line int pos int } func NewSlice(base *src.PosBase, line int, tokens []Token) *Slice { return &Slice{ tokens: tokens, base: base, line: line, pos: -1, // Next will advance to zero. } }
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Thu Jun 29 22:49:50 UTC 2023 - 1.6K bytes - Viewed (0) -
src/cmd/internal/src/xpos.go
type PosTable struct { baseList []*PosBase indexMap map[*PosBase]int nameMap map[string]int // Maps file symbol name to index for debug information. } // XPos returns the corresponding XPos for the given pos, // adding pos to t if necessary. func (t *PosTable) XPos(pos Pos) XPos { return XPos{t.baseIndex(pos.base), pos.lico} } func (t *PosTable) baseIndex(base *PosBase) int32 { if base == nil { return 0
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Fri Sep 01 15:52:41 UTC 2023 - 4.9K bytes - Viewed (0) -
src/cmd/asm/internal/lex/stack.go
func (s *Stack) Text() string { return s.tr[len(s.tr)-1].Text() } func (s *Stack) File() string { return s.Base().Filename() } func (s *Stack) Base() *src.PosBase { return s.tr[len(s.tr)-1].Base() } func (s *Stack) SetBase(base *src.PosBase) { s.tr[len(s.tr)-1].SetBase(base) } func (s *Stack) Line() int { return s.tr[len(s.tr)-1].Line() } func (s *Stack) Col() int {
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Mon Jan 09 22:33:23 UTC 2017 - 1.2K bytes - Viewed (0) -
src/cmd/asm/internal/lex/tokenizer.go
case ROT: return "@>" } return t.s.TokenText() } func (t *Tokenizer) File() string { return t.base.Filename() } func (t *Tokenizer) Base() *src.PosBase { return t.base } func (t *Tokenizer) SetBase(base *src.PosBase) { t.base = base } func (t *Tokenizer) Line() int { return t.line } func (t *Tokenizer) Col() int { return t.s.Pos().Column }
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Thu Aug 04 20:35:21 UTC 2022 - 3K bytes - Viewed (0) -
src/cmd/asm/internal/lex/lex.go
Text() string // File reports the source file name of the token. File() string // Base reports the position base of the token. Base() *src.PosBase // SetBase sets the position base. SetBase(*src.PosBase) // Line reports the source line number of the token. Line() int // Col reports the source column number of the token. Col() int // Close does any teardown required. Close() }
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Tue Aug 29 18:31:05 UTC 2023 - 4.1K bytes - Viewed (0) -
src/go/internal/gcimporter/ureader.go
} // TODO(mdempsky): Delta encoding. posBase := r.posBase() line := r.Uint() col := r.Uint() return r.p.fake.pos(posBase, int(line), int(col)) } func (r *reader) posBase() string { return r.p.posBaseIdx(r.Reloc(pkgbits.RelocPosBase)) } func (pr *pkgReader) posBaseIdx(idx pkgbits.Index) string { if b := pr.posBases[idx]; b != "" { return b } var filename string
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Thu May 23 01:00:11 UTC 2024 - 16.6K bytes - Viewed (0) -
src/cmd/compile/internal/syntax/testing.go
// is unknown (line, col = 0, 0). If there are no matching comments, // the result is nil. func CommentMap(src io.Reader, rx *regexp.Regexp) (res map[uint][]Error) { // position of previous token var base *PosBase var prev struct{ line, col uint } var s scanner s.init(src, func(_, _ uint, text string) { if text[0] != '/' { return // not a comment, ignore } if text[1] == '*' {
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Tue Jan 17 19:53:18 UTC 2023 - 2.1K bytes - Viewed (0)