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