diff options
| author | Marc Vertes <mvertes@free.fr> | 2026-01-27 16:37:02 +0100 |
|---|---|---|
| committer | Marc Vertes <mvertes@free.fr> | 2026-01-27 16:37:02 +0100 |
| commit | 60f6ebc8d8369721e105d826145af2b8856ac67e (patch) | |
| tree | 002073b75edc68aba95399db89f50b24ebb6935f /parser/decl.go | |
| parent | aa5861917ac2543f85bf4cfefbb69cf501d4de41 (diff) | |
fix: improve multiple define
The VM Vassign instruction now takes an argument to indicates the
number of assignations to perform on the stack.
Definitions with a function returning multiple values now work.
There is still some simplifications, and also to apply the same
strategy to var declarations with assign.
Diffstat (limited to 'parser/decl.go')
| -rw-r--r-- | parser/decl.go | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/parser/decl.go b/parser/decl.go index 378eb56..0ba0075 100644 --- a/parser/decl.go +++ b/parser/decl.go @@ -358,7 +358,7 @@ func (p *Parser) parseVarLine(in Tokens) (out Tokens, err error) { } out = append(out, newIdent(vars[i], 0)) out = append(out, v...) - out = append(out, newToken(lang.Assign, "", 0)) + out = append(out, newToken(lang.Assign, "", 0, 1)) } return out, err } |
