Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 2 of 2 for RelFilename (0.1 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)
Back to top