Lines Matching refs:Values
36 for i := 0; i < len(list.Values); i++ {
37 // Find a set of values on contiguous lines
38 line := list.Values[i].Pos().Line
40 for j = i + 1; j < len(list.Values); j++ {
41 if list.Values[j].Pos().Line > line+1 {
44 line = list.Values[j].Pos().Line
48 if j < len(list.Values) {
49 nextPos = list.Values[j].Pos()
51 sortSubList(list.Values[i:j], nextPos, file)
57 for i := 0; i < len(list.Values); i++ {
58 // Find a set of values on contiguous lines
59 line := list.Values[i].Pos().Line
61 for j = i + 1; j < len(list.Values); j++ {
62 if list.Values[j].Pos().Line > line+1 {
65 line = list.Values[j].Pos().Line
68 if !subListIsSorted(list.Values[i:j]) {
93 func sortSubList(values []Expression, nextPos scanner.Position, file *File) {
94 l := make(elemList, len(values))
95 for i, v := range values {
101 if i < len(values)-1 {
102 n = values[i+1].Pos()
109 copyValues := append([]Expression{}, values...)
121 curPos := values[0].Pos()
123 values[i] = copyValues[e.i]
124 values[i].(*String).LiteralPos = curPos
128 file.Comments[j].Comments[0].Slash.Offset += values[i].Pos().Offset - e.pos.Offset
137 func subListIsSorted(values []Expression) bool {
139 for _, v := range values {