| 1 | /* |
| 2 | Package interp provides a complete Go interpreter. |
| 3 | |
| 4 | For the Go language itself, refer to the official Go specification |
| 5 | https://golang.org/ref/spec. |
| 6 | |
| 7 | # Importing packages |
| 8 | |
| 9 | Packages can be imported in source or binary form, using the standard |
| 10 | Go import statement. In source form, packages are searched first in the |
| 11 | vendor directory, the preferred way to store source dependencies. If not |
| 12 | found in vendor, sources modules will be searched in GOPATH. Go modules |
| 13 | are not supported yet by yaegi. |
| 14 | |
| 15 | Binary form packages are compiled and linked with the interpreter |
| 16 | executable, and exposed to scripts with the Use method. The extract |
| 17 | subcommand of yaegi can be used to generate package wrappers. |
| 18 | |
| 19 | # Custom build tags |
| 20 | |
| 21 | Custom build tags allow to control which files in imported source |
| 22 | packages are interpreted, in the same way as the "-tags" option of the |
| 23 | "go build" command. Setting a custom build tag spans globally for all |
| 24 | future imports of the session. |
| 25 | |
| 26 | A build tag is a line comment that begins |
| 27 | |
| 28 | // yaegi:tags |
| 29 | |
| 30 | that lists the build constraints to be satisfied by the further |
| 31 | imports of source packages. |
| 32 | |
| 33 | For example the following custom build tag |
| 34 | |
| 35 | // yaegi:tags noasm |
| 36 | |
| 37 | Will ensure that an import of a package will exclude files containing |
| 38 | |
| 39 | // +build !noasm |
| 40 | |
| 41 | And include files containing |
| 42 | |
| 43 | // +build noasm |
| 44 | */ |
| 45 | package interp |
| 46 | |
| 47 | // BUG(marc): Support for recursive types is incomplete. |
| 48 | // BUG(marc): Support of types implementing multiple interfaces is incomplete. |