MCPcopy Create free account
hub / github.com/dop251/goja / Less

Method Less

parser/error.go:137–152  ·  view source on GitHub ↗
(i, j int)

Source from the content-addressed store, hash-verified

135func (self ErrorList) Len() int { return len(self) }
136func (self ErrorList) Swap(i, j int) { self[i], self[j] = self[j], self[i] }
137func (self ErrorList) Less(i, j int) bool {
138 x := &self[i].Position
139 y := &self[j].Position
140 if x.Filename < y.Filename {
141 return true
142 }
143 if x.Filename == y.Filename {
144 if x.Line < y.Line {
145 return true
146 }
147 if x.Line == y.Line {
148 return x.Column < y.Column
149 }
150 }
151 return false
152}
153
154func (self ErrorList) Sort() {
155 sort.Sort(self)

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected