Lines Matching refs:file
117 func SortLists(file *File) {
118 for _, def := range file.Defs {
120 sortListsInValue(assignment.Value, file)
123 sortListsInValue(prop.Value, file)
127 sort.Sort(commentsByOffset(file.Comments))
130 func SortList(file *File, list *List) {
149 sortSubList(list.Values[i:j], nextPos, file)
175 func sortListsInValue(value Expression, file *File) {
180 sortListsInValue(v.Args[0], file)
181 sortListsInValue(v.Args[1], file)
184 sortListsInValue(p.Value, file)
187 SortList(file, v)
191 func sortSubList(values []Expression, nextPos scanner.Position, file *File) {
213 copyComments := make([]*CommentGroup, len(file.Comments))
214 for i := range file.Comments {
215 cg := *file.Comments[i]
217 for j := range file.Comments[i].Comments {
218 c := *file.Comments[i].Comments[j]
230 file.Comments[j].Comments[0].Slash.Line = curPos.Line
231 file.Comments[j].Comments[0].Slash.Offset += values[i].Pos().Offset - e.pos.Offset