Skip to content

Commit

Permalink
x/typescheck: add Config.IgnoreFuncBodies
Browse files Browse the repository at this point in the history
  • Loading branch information
visualfc committed Feb 27, 2024
1 parent 38aec77 commit 757ea56
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions x/typesutil/check.go
Original file line number Diff line number Diff line change
Expand Up @@ -77,6 +77,9 @@ type Config struct {
// Default is github.com/goplus/.
C2goBase string

// If IgnoreFuncBodies is set, skip compiling function bodies (optional).
IgnoreFuncBodies bool

// Mod represents a Go+ module (optional).
Mod *gopmod.Module
}
Expand Down Expand Up @@ -152,6 +155,7 @@ func (p *Checker) Files(goFiles []*goast.File, gopFiles []*ast.File) (err error)
NoFileLine: true,
NoAutoGenMain: true,
NoSkipConstant: true,
Outline: opts.IgnoreFuncBodies,
})
if err != nil {
if onErr := conf.Error; onErr != nil {
Expand Down

0 comments on commit 757ea56

Please sign in to comment.