Commit Graph

20 Commits

Author SHA1 Message Date
Ludovic Fernandez
dea1f56f38 refactor: use struct to define interpreter Options. (#236) 2019-07-03 19:46:17 +02:00
Marc Vertes
274c0fc47a chore: API and code cleanup. Rename stdlib.Value into stdlib.Symbols (#231) 2019-06-27 12:40:04 +02:00
Marc Vertes
8910769b77 feat: functional options to New() (#149) 2019-04-05 21:36:48 +02:00
Marc Vertes
68e25cf68e fix: wrong returned type in define from function call in global context (#148) 2019-04-02 16:05:39 +02:00
Fernandez Ludovic
12b608b625 chore: rename to yaegi. 2019-03-20 10:15:35 +01:00
Marc Vertes
5a10046944 feat: simplify Use() (#115)
Change API from
func Use(val libValueMap, typ libTypeMap)
to
func Use(val libValueMap)
2019-03-13 12:24:59 +01:00
Marc Vertes
5677e0501e fix: correct propagation of values during eval (#95)
Eval returns the value of the root node of AST, so ensure
that node values are propagated back to ExprStmt and BlockStmt,
which should be sufficient to handle evaluation of simple
statements.
2019-02-19 14:51:44 +01:00
Marc Vertes
18330ad7f9 fix: function created by reflect.MakeFunc using closure had wrong type (#75)
Call genNodeWrapper on interpreted function returned by a closure,
itself being wrapped, to ensure that the function can be called from
binary, no matter the level of nesting closures.
2019-02-03 15:38:21 +01:00
Marc Vertes
6fc6560af3 fix: handle name import of src packages (#74)
Rename the package scope from internal package name to alias name.
Detect different packages in the same directory (forbidden by spec).
Update example to test named import.
2019-02-02 14:18:09 +01:00
Ludovic Fernandez
27a338d84a fix: recursively search for packages. (#72) 2019-02-01 11:47:41 +01:00
Ludovic Fernandez
3f0e693383 refactor: support imports/package/vendor. (#41)
* test: adds tests about package and vendor.

* refactor: support imports/package/vendor.

* review.
2019-01-24 16:16:49 +01:00
Ludovic Fernandez
c09c1869a7 refactor: remove obsolete tests for plugins. (#36) 2019-01-24 06:14:31 +01:00
Ludovic Fernandez
3f000e5fac refactor: clean and plugin tests (#26)
* refactor: remove gi_c
* refactor: new intergation example.
* chore: adds new targets.
* doc: adds issue template.
2019-01-22 15:53:52 +01:00
Marc Vertes
098829d316 style: fix warnings from golangci-lint printed by make check (#11)
* style: fix warnings from golangci-lint printed by `make check`
* style: err assign in if block when possible. Better use of switch/case
* style: err assign in if block when possible
2019-01-16 18:59:24 +01:00
Marc Vertes
29f5a29d28 rename interp2.go into inception.go 2018-12-19 16:39:23 +01:00
Marc Vertes
27cbeef38d Methods created in the interpreter can now be used by runtime 2018-12-19 15:10:26 +01:00
Marc Vertes
f8a4aba39b Add interpreter inception example 2018-12-11 17:23:24 -08:00
Marc Vertes
b0ef0a00db Interpreter now exports itself, so scripts can do Eval() too 2018-12-11 10:29:43 -08:00
Marc Vertes
480ef53daf Get rid of Export(). Fix golint warnings 2018-12-11 03:38:51 -08:00
Marc Vertes
6a23877ce2 Eval: wrap returned interpreter node into a callable function 2018-12-11 03:12:50 -08:00