@@ -19,7 +19,6 @@ package cl
19
19
20
20
import (
21
21
"fmt"
22
- "go/constant"
23
22
"go/types"
24
23
"log"
25
24
"reflect"
@@ -175,9 +174,6 @@ type Config struct {
175
174
// Fset provides source position information for syntax trees and types (required).
176
175
Fset * token.FileSet
177
176
178
- // Context represents all things between packages (optional).
179
- Context * gox.Context
180
-
181
177
// RelativeBase is the root directory of relative path.
182
178
RelativeBase string
183
179
@@ -193,9 +189,6 @@ type Config struct {
193
189
// See (*github.com/goplus/mod/gopmod.Module).LookupClass.
194
190
LookupClass func (ext string ) (c * Project , ok bool )
195
191
196
- // IsPkgtStandard checks a pkgPath is a Go standard package or not.
197
- IsPkgtStandard func (pkgPath string ) bool
198
-
199
192
// An Importer resolves import paths to Packages (optional).
200
193
Importer types.Importer
201
194
@@ -491,8 +484,6 @@ func NewPackage(pkgPath string, pkg *ast.Package, conf *Config) (p *gox.Package,
491
484
confGox := & gox.Config {
492
485
Types : conf .Types ,
493
486
Fset : fset ,
494
- Context : conf .Context ,
495
- IsPkgtStandard : conf .IsPkgtStandard ,
496
487
Importer : conf .Importer ,
497
488
LoadNamed : ctx .loadNamed ,
498
489
HandleErr : ctx .handleErr ,
@@ -625,10 +616,6 @@ func NewPackage(pkgPath string, pkg *ast.Package, conf *Config) (p *gox.Package,
625
616
return
626
617
}
627
618
628
- const (
629
- gopPackage = "GopPackage"
630
- )
631
-
632
619
func isOverloadFunc (name string ) bool {
633
620
n := len (name )
634
621
return n > 3 && name [n - 3 :n - 1 ] == "__"
@@ -652,9 +639,6 @@ func initGopPkg(ctx *pkgCtx, pkg *gox.Package, gopSyms map[string]bool) {
652
639
ctx .loadType (lbi .(* ast.Ident ).Name )
653
640
}
654
641
}
655
- if scope := pkg .Types .Scope (); scope .Lookup (gopPackage ) == nil {
656
- scope .Insert (types .NewConst (token .NoPos , pkg .Types , gopPackage , types .Typ [types .UntypedBool ], constant .MakeBool (true )))
657
- }
658
642
gox .InitThisGopPkg (pkg .Types )
659
643
}
660
644
0 commit comments