Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 6 of 6 for RelFilename (0.11 sec)

  1. src/cmd/internal/src/pos_test.go

    		}
    		if got := pos.Col(); got != test.col {
    			t.Errorf("%s: got col %d; want %d", test.string, got, test.col)
    		}
    
    		// 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)
    		}
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Mon Feb 14 23:50:26 UTC 2022
    - 8.4K bytes
    - Viewed (0)
  2. src/cmd/compile/internal/syntax/pos.go

    //	r >  0: p is after q
    //
    // If p and q are in different files, p is before q if the filename
    // of p sorts lexicographically before the filename of q.
    func (p Pos) Cmp(q Pos) int {
    	pname := p.RelFilename()
    	qname := q.RelFilename()
    	switch {
    	case pname < qname:
    		return -1
    	case pname > qname:
    		return +1
    	}
    
    	pline := p.Line()
    	qline := q.Line()
    	switch {
    	case pline < qline:
    		return -1
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Mon May 20 20:44:57 UTC 2024
    - 5.6K bytes
    - Viewed (0)
  3. src/cmd/internal/src/pos.go

    func (p Pos) Filename() string { return p.base.Pos().RelFilename() }
    
    // Base returns the position base.
    func (p Pos) Base() *PosBase { return p.base }
    
    // SetBase sets the position base.
    func (p *Pos) SetBase(base *PosBase) { p.base = base }
    
    // RelFilename returns the filename recorded with the position's base.
    func (p Pos) RelFilename() string { return p.base.Filename() }
    
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Fri Sep 01 15:52:41 UTC 2023
    - 15.5K bytes
    - Viewed (0)
  4. src/cmd/compile/internal/types2/resolver.go

    	file := check.files[fileNo]
    	if pos := file.Pos(); pos.IsKnown() {
    		// return check.fset.File(pos).Name()
    		// TODO(gri) do we need the actual file name here?
    		return pos.RelFilename()
    	}
    	return fmt.Sprintf("file[%d]", fileNo)
    }
    
    func (check *Checker) importPackage(pos syntax.Pos, path, dir string) *Package {
    	// If we already have a package for the given (path, dir)
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu Apr 18 14:10:44 UTC 2024
    - 26.3K bytes
    - Viewed (0)
  5. src/cmd/compile/internal/syntax/parser_test.go

    			continue
    		}
    		if msg := perr.Msg; msg != test.msg {
    			t.Errorf("%s: got msg = %q; want %q", test.src, msg, test.msg)
    		}
    
    		pos := perr.Pos
    		if filename := pos.RelFilename(); filename != test.filename {
    			t.Errorf("%s: got filename = %q; want %q", test.src, filename, test.filename)
    		}
    		if line := pos.RelLine(); line != test.line {
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu Mar 14 16:30:19 UTC 2024
    - 12.2K bytes
    - Viewed (0)
  6. src/cmd/compile/internal/dwarfgen/dwinl.go

    	dcl := preInliningDcls(fnsym)
    	m := make(map[varPos]int)
    	for i, n := range dcl {
    		pos := base.Ctxt.InnermostPos(n.Pos())
    		vp := varPos{
    			DeclName: n.Sym().Name,
    			DeclFile: pos.RelFilename(),
    			DeclLine: pos.RelLine(),
    			DeclCol:  pos.RelCol(),
    		}
    		if _, found := m[vp]; found {
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Mon Feb 26 20:45:07 UTC 2024
    - 12.8K bytes
    - Viewed (0)
Back to top