Source file
src/go/ast/ast.go
Documentation: go/ast
1
2
3
4
5
6
7
8 package ast
9
10 import (
11 "go/token"
12 "strings"
13 )
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33 type Node interface {
34 Pos() token.Pos
35 End() token.Pos
36 }
37
38
39 type Expr interface {
40 Node
41 exprNode()
42 }
43
44
45 type Stmt interface {
46 Node
47 stmtNode()
48 }
49
50
51 type Decl interface {
52 Node
53 declNode()
54 }
55
56
57
58
59
60 type Comment struct {
61 Slash token.Pos
62 Text string
63 }
64
65 func (c *Comment) Pos() token.Pos { return c.Slash }
66 func (c *Comment) End() token.Pos { return token.Pos(int(c.Slash) + len(c.Text)) }
67
68
69
70
71 type CommentGroup struct {
72 List []*Comment
73 }
74
75 func (g *CommentGroup) Pos() token.Pos { return g.List[0].Pos() }
76 func (g *CommentGroup) End() token.Pos { return g.List[len(g.List)-1].End() }
77
78 func isWhitespace(ch byte) bool { return ch == ' ' || ch == '\t' || ch == '\n' || ch == '\r' }
79
80 func stripTrailingWhitespace(s string) string {
81 i := len(s)
82 for i > 0 && isWhitespace(s[i-1]) {
83 i--
84 }
85 return s[0:i]
86 }
87
88
89
90
91
92
93
94 func (g *CommentGroup) Text() string {
95 if g == nil {
96 return ""
97 }
98 comments := make([]string, len(g.List))
99 for i, c := range g.List {
100 comments[i] = c.Text
101 }
102
103 lines := make([]string, 0, 10)
104 for _, c := range comments {
105
106
107 switch c[1] {
108 case '/':
109
110 c = c[2:]
111 if len(c) == 0 {
112
113 break
114 }
115 if c[0] == ' ' {
116
117 c = c[1:]
118 break
119 }
120 if isDirective(c) {
121
122 continue
123 }
124 case '*':
125
126 c = c[2 : len(c)-2]
127 }
128
129
130 cl := strings.Split(c, "\n")
131
132
133 for _, l := range cl {
134 lines = append(lines, stripTrailingWhitespace(l))
135 }
136 }
137
138
139
140 n := 0
141 for _, line := range lines {
142 if line != "" || n > 0 && lines[n-1] != "" {
143 lines[n] = line
144 n++
145 }
146 }
147 lines = lines[0:n]
148
149
150 if n > 0 && lines[n-1] != "" {
151 lines = append(lines, "")
152 }
153
154 return strings.Join(lines, "\n")
155 }
156
157
158 func isDirective(c string) bool {
159
160
161 if strings.HasPrefix(c, "line ") {
162 return true
163 }
164
165
166
167 colon := strings.Index(c, ":")
168 if colon <= 0 || colon+1 >= len(c) {
169 return false
170 }
171 for i := 0; i <= colon+1; i++ {
172 if i == colon {
173 continue
174 }
175 b := c[i]
176 if !('a' <= b && b <= 'z' || '0' <= b && b <= '9') {
177 return false
178 }
179 }
180 return true
181 }
182
183
184
185
186
187
188
189
190
191
192 type Field struct {
193 Doc *CommentGroup
194 Names []*Ident
195 Type Expr
196 Tag *BasicLit
197 Comment *CommentGroup
198 }
199
200 func (f *Field) Pos() token.Pos {
201 if len(f.Names) > 0 {
202 return f.Names[0].Pos()
203 }
204 return f.Type.Pos()
205 }
206
207 func (f *Field) End() token.Pos {
208 if f.Tag != nil {
209 return f.Tag.End()
210 }
211 return f.Type.End()
212 }
213
214
215 type FieldList struct {
216 Opening token.Pos
217 List []*Field
218 Closing token.Pos
219 }
220
221 func (f *FieldList) Pos() token.Pos {
222 if f.Opening.IsValid() {
223 return f.Opening
224 }
225
226
227 if len(f.List) > 0 {
228 return f.List[0].Pos()
229 }
230 return token.NoPos
231 }
232
233 func (f *FieldList) End() token.Pos {
234 if f.Closing.IsValid() {
235 return f.Closing + 1
236 }
237
238
239 if n := len(f.List); n > 0 {
240 return f.List[n-1].End()
241 }
242 return token.NoPos
243 }
244
245
246 func (f *FieldList) NumFields() int {
247 n := 0
248 if f != nil {
249 for _, g := range f.List {
250 m := len(g.Names)
251 if m == 0 {
252 m = 1
253 }
254 n += m
255 }
256 }
257 return n
258 }
259
260
261
262
263 type (
264
265
266
267
268 BadExpr struct {
269 From, To token.Pos
270 }
271
272
273 Ident struct {
274 NamePos token.Pos
275 Name string
276 Obj *Object
277 }
278
279
280
281
282 Ellipsis struct {
283 Ellipsis token.Pos
284 Elt Expr
285 }
286
287
288 BasicLit struct {
289 ValuePos token.Pos
290 Kind token.Token
291 Value string
292 }
293
294
295 FuncLit struct {
296 Type *FuncType
297 Body *BlockStmt
298 }
299
300
301 CompositeLit struct {
302 Type Expr
303 Lbrace token.Pos
304 Elts []Expr
305 Rbrace token.Pos
306 Incomplete bool
307 }
308
309
310 ParenExpr struct {
311 Lparen token.Pos
312 X Expr
313 Rparen token.Pos
314 }
315
316
317 SelectorExpr struct {
318 X Expr
319 Sel *Ident
320 }
321
322
323 IndexExpr struct {
324 X Expr
325 Lbrack token.Pos
326 Index Expr
327 Rbrack token.Pos
328 }
329
330
331 SliceExpr struct {
332 X Expr
333 Lbrack token.Pos
334 Low Expr
335 High Expr
336 Max Expr
337 Slice3 bool
338 Rbrack token.Pos
339 }
340
341
342
343
344 TypeAssertExpr struct {
345 X Expr
346 Lparen token.Pos
347 Type Expr
348 Rparen token.Pos
349 }
350
351
352 CallExpr struct {
353 Fun Expr
354 Lparen token.Pos
355 Args []Expr
356 Ellipsis token.Pos
357 Rparen token.Pos
358 }
359
360
361
362
363 StarExpr struct {
364 Star token.Pos
365 X Expr
366 }
367
368
369
370
371 UnaryExpr struct {
372 OpPos token.Pos
373 Op token.Token
374 X Expr
375 }
376
377
378 BinaryExpr struct {
379 X Expr
380 OpPos token.Pos
381 Op token.Token
382 Y Expr
383 }
384
385
386
387
388 KeyValueExpr struct {
389 Key Expr
390 Colon token.Pos
391 Value Expr
392 }
393 )
394
395
396
397
398 type ChanDir int
399
400 const (
401 SEND ChanDir = 1 << iota
402 RECV
403 )
404
405
406
407
408
409 type (
410
411 ArrayType struct {
412 Lbrack token.Pos
413 Len Expr
414 Elt Expr
415 }
416
417
418 StructType struct {
419 Struct token.Pos
420 Fields *FieldList
421 Incomplete bool
422 }
423
424
425
426
427 FuncType struct {
428 Func token.Pos
429 Params *FieldList
430 Results *FieldList
431 }
432
433
434 InterfaceType struct {
435 Interface token.Pos
436 Methods *FieldList
437 Incomplete bool
438 }
439
440
441 MapType struct {
442 Map token.Pos
443 Key Expr
444 Value Expr
445 }
446
447
448 ChanType struct {
449 Begin token.Pos
450 Arrow token.Pos
451 Dir ChanDir
452 Value Expr
453 }
454 )
455
456
457
458 func (x *BadExpr) Pos() token.Pos { return x.From }
459 func (x *Ident) Pos() token.Pos { return x.NamePos }
460 func (x *Ellipsis) Pos() token.Pos { return x.Ellipsis }
461 func (x *BasicLit) Pos() token.Pos { return x.ValuePos }
462 func (x *FuncLit) Pos() token.Pos { return x.Type.Pos() }
463 func (x *CompositeLit) Pos() token.Pos {
464 if x.Type != nil {
465 return x.Type.Pos()
466 }
467 return x.Lbrace
468 }
469 func (x *ParenExpr) Pos() token.Pos { return x.Lparen }
470 func (x *SelectorExpr) Pos() token.Pos { return x.X.Pos() }
471 func (x *IndexExpr) Pos() token.Pos { return x.X.Pos() }
472 func (x *SliceExpr) Pos() token.Pos { return x.X.Pos() }
473 func (x *TypeAssertExpr) Pos() token.Pos { return x.X.Pos() }
474 func (x *CallExpr) Pos() token.Pos { return x.Fun.Pos() }
475 func (x *StarExpr) Pos() token.Pos { return x.Star }
476 func (x *UnaryExpr) Pos() token.Pos { return x.OpPos }
477 func (x *BinaryExpr) Pos() token.Pos { return x.X.Pos() }
478 func (x *KeyValueExpr) Pos() token.Pos { return x.Key.Pos() }
479 func (x *ArrayType) Pos() token.Pos { return x.Lbrack }
480 func (x *StructType) Pos() token.Pos { return x.Struct }
481 func (x *FuncType) Pos() token.Pos {
482 if x.Func.IsValid() || x.Params == nil {
483 return x.Func
484 }
485 return x.Params.Pos()
486 }
487 func (x *InterfaceType) Pos() token.Pos { return x.Interface }
488 func (x *MapType) Pos() token.Pos { return x.Map }
489 func (x *ChanType) Pos() token.Pos { return x.Begin }
490
491 func (x *BadExpr) End() token.Pos { return x.To }
492 func (x *Ident) End() token.Pos { return token.Pos(int(x.NamePos) + len(x.Name)) }
493 func (x *Ellipsis) End() token.Pos {
494 if x.Elt != nil {
495 return x.Elt.End()
496 }
497 return x.Ellipsis + 3
498 }
499 func (x *BasicLit) End() token.Pos { return token.Pos(int(x.ValuePos) + len(x.Value)) }
500 func (x *FuncLit) End() token.Pos { return x.Body.End() }
501 func (x *CompositeLit) End() token.Pos { return x.Rbrace + 1 }
502 func (x *ParenExpr) End() token.Pos { return x.Rparen + 1 }
503 func (x *SelectorExpr) End() token.Pos { return x.Sel.End() }
504 func (x *IndexExpr) End() token.Pos { return x.Rbrack + 1 }
505 func (x *SliceExpr) End() token.Pos { return x.Rbrack + 1 }
506 func (x *TypeAssertExpr) End() token.Pos { return x.Rparen + 1 }
507 func (x *CallExpr) End() token.Pos { return x.Rparen + 1 }
508 func (x *StarExpr) End() token.Pos { return x.X.End() }
509 func (x *UnaryExpr) End() token.Pos { return x.X.End() }
510 func (x *BinaryExpr) End() token.Pos { return x.Y.End() }
511 func (x *KeyValueExpr) End() token.Pos { return x.Value.End() }
512 func (x *ArrayType) End() token.Pos { return x.Elt.End() }
513 func (x *StructType) End() token.Pos { return x.Fields.End() }
514 func (x *FuncType) End() token.Pos {
515 if x.Results != nil {
516 return x.Results.End()
517 }
518 return x.Params.End()
519 }
520 func (x *InterfaceType) End() token.Pos { return x.Methods.End() }
521 func (x *MapType) End() token.Pos { return x.Value.End() }
522 func (x *ChanType) End() token.Pos { return x.Value.End() }
523
524
525
526
527 func (*BadExpr) exprNode() {}
528 func (*Ident) exprNode() {}
529 func (*Ellipsis) exprNode() {}
530 func (*BasicLit) exprNode() {}
531 func (*FuncLit) exprNode() {}
532 func (*CompositeLit) exprNode() {}
533 func (*ParenExpr) exprNode() {}
534 func (*SelectorExpr) exprNode() {}
535 func (*IndexExpr) exprNode() {}
536 func (*SliceExpr) exprNode() {}
537 func (*TypeAssertExpr) exprNode() {}
538 func (*CallExpr) exprNode() {}
539 func (*StarExpr) exprNode() {}
540 func (*UnaryExpr) exprNode() {}
541 func (*BinaryExpr) exprNode() {}
542 func (*KeyValueExpr) exprNode() {}
543
544 func (*ArrayType) exprNode() {}
545 func (*StructType) exprNode() {}
546 func (*FuncType) exprNode() {}
547 func (*InterfaceType) exprNode() {}
548 func (*MapType) exprNode() {}
549 func (*ChanType) exprNode() {}
550
551
552
553
554
555
556
557 func NewIdent(name string) *Ident { return &Ident{token.NoPos, name, nil} }
558
559
560
561 func IsExported(name string) bool { return token.IsExported(name) }
562
563
564
565 func (id *Ident) IsExported() bool { return token.IsExported(id.Name) }
566
567 func (id *Ident) String() string {
568 if id != nil {
569 return id.Name
570 }
571 return "<nil>"
572 }
573
574
575
576
577
578
579
580 type (
581
582
583
584
585 BadStmt struct {
586 From, To token.Pos
587 }
588
589
590 DeclStmt struct {
591 Decl Decl
592 }
593
594
595
596
597
598 EmptyStmt struct {
599 Semicolon token.Pos
600 Implicit bool
601 }
602
603
604 LabeledStmt struct {
605 Label *Ident
606 Colon token.Pos
607 Stmt Stmt
608 }
609
610
611
612
613 ExprStmt struct {
614 X Expr
615 }
616
617
618 SendStmt struct {
619 Chan Expr
620 Arrow token.Pos
621 Value Expr
622 }
623
624
625 IncDecStmt struct {
626 X Expr
627 TokPos token.Pos
628 Tok token.Token
629 }
630
631
632
633
634 AssignStmt struct {
635 Lhs []Expr
636 TokPos token.Pos
637 Tok token.Token
638 Rhs []Expr
639 }
640
641
642 GoStmt struct {
643 Go token.Pos
644 Call *CallExpr
645 }
646
647
648 DeferStmt struct {
649 Defer token.Pos
650 Call *CallExpr
651 }
652
653
654 ReturnStmt struct {
655 Return token.Pos
656 Results []Expr
657 }
658
659
660
661
662 BranchStmt struct {
663 TokPos token.Pos
664 Tok token.Token
665 Label *Ident
666 }
667
668
669 BlockStmt struct {
670 Lbrace token.Pos
671 List []Stmt
672 Rbrace token.Pos
673 }
674
675
676 IfStmt struct {
677 If token.Pos
678 Init Stmt
679 Cond Expr
680 Body *BlockStmt
681 Else Stmt
682 }
683
684
685 CaseClause struct {
686 Case token.Pos
687 List []Expr
688 Colon token.Pos
689 Body []Stmt
690 }
691
692
693 SwitchStmt struct {
694 Switch token.Pos
695 Init Stmt
696 Tag Expr
697 Body *BlockStmt
698 }
699
700
701 TypeSwitchStmt struct {
702 Switch token.Pos
703 Init Stmt
704 Assign Stmt
705 Body *BlockStmt
706 }
707
708
709 CommClause struct {
710 Case token.Pos
711 Comm Stmt
712 Colon token.Pos
713 Body []Stmt
714 }
715
716
717 SelectStmt struct {
718 Select token.Pos
719 Body *BlockStmt
720 }
721
722
723 ForStmt struct {
724 For token.Pos
725 Init Stmt
726 Cond Expr
727 Post Stmt
728 Body *BlockStmt
729 }
730
731
732 RangeStmt struct {
733 For token.Pos
734 Key, Value Expr
735 TokPos token.Pos
736 Tok token.Token
737 X Expr
738 Body *BlockStmt
739 }
740 )
741
742
743
744 func (s *BadStmt) Pos() token.Pos { return s.From }
745 func (s *DeclStmt) Pos() token.Pos { return s.Decl.Pos() }
746 func (s *EmptyStmt) Pos() token.Pos { return s.Semicolon }
747 func (s *LabeledStmt) Pos() token.Pos { return s.Label.Pos() }
748 func (s *ExprStmt) Pos() token.Pos { return s.X.Pos() }
749 func (s *SendStmt) Pos() token.Pos { return s.Chan.Pos() }
750 func (s *IncDecStmt) Pos() token.Pos { return s.X.Pos() }
751 func (s *AssignStmt) Pos() token.Pos { return s.Lhs[0].Pos() }
752 func (s *GoStmt) Pos() token.Pos { return s.Go }
753 func (s *DeferStmt) Pos() token.Pos { return s.Defer }
754 func (s *ReturnStmt) Pos() token.Pos { return s.Return }
755 func (s *BranchStmt) Pos() token.Pos { return s.TokPos }
756 func (s *BlockStmt) Pos() token.Pos { return s.Lbrace }
757 func (s *IfStmt) Pos() token.Pos { return s.If }
758 func (s *CaseClause) Pos() token.Pos { return s.Case }
759 func (s *SwitchStmt) Pos() token.Pos { return s.Switch }
760 func (s *TypeSwitchStmt) Pos() token.Pos { return s.Switch }
761 func (s *CommClause) Pos() token.Pos { return s.Case }
762 func (s *SelectStmt) Pos() token.Pos { return s.Select }
763 func (s *ForStmt) Pos() token.Pos { return s.For }
764 func (s *RangeStmt) Pos() token.Pos { return s.For }
765
766 func (s *BadStmt) End() token.Pos { return s.To }
767 func (s *DeclStmt) End() token.Pos { return s.Decl.End() }
768 func (s *EmptyStmt) End() token.Pos {
769 if s.Implicit {
770 return s.Semicolon
771 }
772 return s.Semicolon + 1
773 }
774 func (s *LabeledStmt) End() token.Pos { return s.Stmt.End() }
775 func (s *ExprStmt) End() token.Pos { return s.X.End() }
776 func (s *SendStmt) End() token.Pos { return s.Value.End() }
777 func (s *IncDecStmt) End() token.Pos {
778 return s.TokPos + 2
779 }
780 func (s *AssignStmt) End() token.Pos { return s.Rhs[len(s.Rhs)-1].End() }
781 func (s *GoStmt) End() token.Pos { return s.Call.End() }
782 func (s *DeferStmt) End() token.Pos { return s.Call.End() }
783 func (s *ReturnStmt) End() token.Pos {
784 if n := len(s.Results); n > 0 {
785 return s.Results[n-1].End()
786 }
787 return s.Return + 6
788 }
789 func (s *BranchStmt) End() token.Pos {
790 if s.Label != nil {
791 return s.Label.End()
792 }
793 return token.Pos(int(s.TokPos) + len(s.Tok.String()))
794 }
795 func (s *BlockStmt) End() token.Pos {
796 if s.Rbrace.IsValid() {
797 return s.Rbrace + 1
798 }
799 if n := len(s.List); n > 0 {
800 return s.List[n-1].End()
801 }
802 return s.Lbrace + 1
803 }
804 func (s *IfStmt) End() token.Pos {
805 if s.Else != nil {
806 return s.Else.End()
807 }
808 return s.Body.End()
809 }
810 func (s *CaseClause) End() token.Pos {
811 if n := len(s.Body); n > 0 {
812 return s.Body[n-1].End()
813 }
814 return s.Colon + 1
815 }
816 func (s *SwitchStmt) End() token.Pos { return s.Body.End() }
817 func (s *TypeSwitchStmt) End() token.Pos { return s.Body.End() }
818 func (s *CommClause) End() token.Pos {
819 if n := len(s.Body); n > 0 {
820 return s.Body[n-1].End()
821 }
822 return s.Colon + 1
823 }
824 func (s *SelectStmt) End() token.Pos { return s.Body.End() }
825 func (s *ForStmt) End() token.Pos { return s.Body.End() }
826 func (s *RangeStmt) End() token.Pos { return s.Body.End() }
827
828
829
830
831 func (*BadStmt) stmtNode() {}
832 func (*DeclStmt) stmtNode() {}
833 func (*EmptyStmt) stmtNode() {}
834 func (*LabeledStmt) stmtNode() {}
835 func (*ExprStmt) stmtNode() {}
836 func (*SendStmt) stmtNode() {}
837 func (*IncDecStmt) stmtNode() {}
838 func (*AssignStmt) stmtNode() {}
839 func (*GoStmt) stmtNode() {}
840 func (*DeferStmt) stmtNode() {}
841 func (*ReturnStmt) stmtNode() {}
842 func (*BranchStmt) stmtNode() {}
843 func (*BlockStmt) stmtNode() {}
844 func (*IfStmt) stmtNode() {}
845 func (*CaseClause) stmtNode() {}
846 func (*SwitchStmt) stmtNode() {}
847 func (*TypeSwitchStmt) stmtNode() {}
848 func (*CommClause) stmtNode() {}
849 func (*SelectStmt) stmtNode() {}
850 func (*ForStmt) stmtNode() {}
851 func (*RangeStmt) stmtNode() {}
852
853
854
855
856
857
858
859 type (
860
861 Spec interface {
862 Node
863 specNode()
864 }
865
866
867 ImportSpec struct {
868 Doc *CommentGroup
869 Name *Ident
870 Path *BasicLit
871 Comment *CommentGroup
872 EndPos token.Pos
873 }
874
875
876
877
878 ValueSpec struct {
879 Doc *CommentGroup
880 Names []*Ident
881 Type Expr
882 Values []Expr
883 Comment *CommentGroup
884 }
885
886
887 TypeSpec struct {
888 Doc *CommentGroup
889 Name *Ident
890 Assign token.Pos
891 Type Expr
892 Comment *CommentGroup
893 }
894 )
895
896
897
898 func (s *ImportSpec) Pos() token.Pos {
899 if s.Name != nil {
900 return s.Name.Pos()
901 }
902 return s.Path.Pos()
903 }
904 func (s *ValueSpec) Pos() token.Pos { return s.Names[0].Pos() }
905 func (s *TypeSpec) Pos() token.Pos { return s.Name.Pos() }
906
907 func (s *ImportSpec) End() token.Pos {
908 if s.EndPos != 0 {
909 return s.EndPos
910 }
911 return s.Path.End()
912 }
913
914 func (s *ValueSpec) End() token.Pos {
915 if n := len(s.Values); n > 0 {
916 return s.Values[n-1].End()
917 }
918 if s.Type != nil {
919 return s.Type.End()
920 }
921 return s.Names[len(s.Names)-1].End()
922 }
923 func (s *TypeSpec) End() token.Pos { return s.Type.End() }
924
925
926
927
928 func (*ImportSpec) specNode() {}
929 func (*ValueSpec) specNode() {}
930 func (*TypeSpec) specNode() {}
931
932
933
934 type (
935
936
937
938
939 BadDecl struct {
940 From, To token.Pos
941 }
942
943
944
945
946
947
948
949
950
951
952
953
954 GenDecl struct {
955 Doc *CommentGroup
956 TokPos token.Pos
957 Tok token.Token
958 Lparen token.Pos
959 Specs []Spec
960 Rparen token.Pos
961 }
962
963
964 FuncDecl struct {
965 Doc *CommentGroup
966 Recv *FieldList
967 Name *Ident
968 Type *FuncType
969 Body *BlockStmt
970 }
971 )
972
973
974
975 func (d *BadDecl) Pos() token.Pos { return d.From }
976 func (d *GenDecl) Pos() token.Pos { return d.TokPos }
977 func (d *FuncDecl) Pos() token.Pos { return d.Type.Pos() }
978
979 func (d *BadDecl) End() token.Pos { return d.To }
980 func (d *GenDecl) End() token.Pos {
981 if d.Rparen.IsValid() {
982 return d.Rparen + 1
983 }
984 return d.Specs[0].End()
985 }
986 func (d *FuncDecl) End() token.Pos {
987 if d.Body != nil {
988 return d.Body.End()
989 }
990 return d.Type.End()
991 }
992
993
994
995
996 func (*BadDecl) declNode() {}
997 func (*GenDecl) declNode() {}
998 func (*FuncDecl) declNode() {}
999
1000
1001
1002
1003
1004
1005
1006
1007
1008
1009
1010
1011
1012
1013
1014
1015
1016
1017
1018
1019
1020
1021
1022 type File struct {
1023 Doc *CommentGroup
1024 Package token.Pos
1025 Name *Ident
1026 Decls []Decl
1027 Scope *Scope
1028 Imports []*ImportSpec
1029 Unresolved []*Ident
1030 Comments []*CommentGroup
1031 }
1032
1033 func (f *File) Pos() token.Pos { return f.Package }
1034 func (f *File) End() token.Pos {
1035 if n := len(f.Decls); n > 0 {
1036 return f.Decls[n-1].End()
1037 }
1038 return f.Name.End()
1039 }
1040
1041
1042
1043
1044 type Package struct {
1045 Name string
1046 Scope *Scope
1047 Imports map[string]*Object
1048 Files map[string]*File
1049 }
1050
1051 func (p *Package) Pos() token.Pos { return token.NoPos }
1052 func (p *Package) End() token.Pos { return token.NoPos }
1053
View as plain text