Lines Matching refs:file
22 func SortLists(file *File) {
23 for _, def := range file.Defs {
25 sortListsInValue(assignment.Value, file)
28 sortListsInValue(prop.Value, file)
32 sort.Sort(commentsByOffset(file.Comments))
35 func SortList(file *File, list *List) {
51 sortSubList(list.Values[i:j], nextPos, file)
77 func sortListsInValue(value Expression, file *File) {
82 sortListsInValue(v.Args[0], file)
83 sortListsInValue(v.Args[1], file)
86 sortListsInValue(p.Value, file)
89 SortList(file, v)
93 func sortSubList(values []Expression, nextPos scanner.Position, file *File) {
110 copyComments := make([]*CommentGroup, len(file.Comments))
111 for i := range file.Comments {
112 cg := *file.Comments[i]
114 for j := range file.Comments[i].Comments {
115 c := *file.Comments[i].Comments[j]
127 file.Comments[j].Comments[0].Slash.Line = curPos.Line
128 file.Comments[j].Comments[0].Slash.Offset += values[i].Pos().Offset - e.pos.Offset