summaryrefslogtreecommitdiff
path: root/vm0/vm.go
diff options
context:
space:
mode:
authorMarc Vertes <mvertes@free.fr>2023-09-06 08:49:19 +0200
committerMarc Vertes <mvertes@free.fr>2023-09-06 08:49:19 +0200
commit6dd78f44adf6fb032d0ecd9db813651b9524fcac (patch)
treed1d4b3305db708614f147b2294b4b0e28336a55d /vm0/vm.go
parent4241593b42bffac2f8fcb63f1e88621fe025e360 (diff)
chore: refactor some APIs
The scanner returns a slice of pointers to tokens instead of a slice of tokens. The parser now pass the initial node context.
Diffstat (limited to 'vm0/vm.go')
-rw-r--r--vm0/vm.go2
1 files changed, 1 insertions, 1 deletions
diff --git a/vm0/vm.go b/vm0/vm.go
index d9c9a8d..62344ed 100644
--- a/vm0/vm.go
+++ b/vm0/vm.go
@@ -25,7 +25,7 @@ func New(p *parser.Parser) (i *Interp) {
func (i *Interp) Eval(src string) (res any, err error) {
n := &parser.Node{}
- if n.Child, err = i.Parse(src); err != nil {
+ if n.Child, err = i.Parse(src, n); err != nil {
return
}
if debug {