From 95c50e35888fb54ced38907dc6e97dc683937e70 Mon Sep 17 00:00:00 2001 From: Marc Vertes Date: Sat, 24 Jan 2026 23:06:55 +0100 Subject: fix: improve parsing of assign statements Handle assign statements in parseAssign function. Detect multi-assign by the presence of comma in the right hand side tokens. The case of swap is not handled yet. --- parser/tokens.go | 1 + 1 file changed, 1 insertion(+) (limited to 'parser/tokens.go') diff --git a/parser/tokens.go b/parser/tokens.go index 7a241f3..b8f462f 100644 --- a/parser/tokens.go +++ b/parser/tokens.go @@ -94,3 +94,4 @@ func newInt(i, pos int) Token { return newToken(lang.Int func newColon(pos int) Token { return newToken(lang.Colon, "", pos) } func newLen(i, pos int) Token { return newToken(lang.Len, "", pos, i) } func newSlice(pos int) Token { return newToken(lang.Slice, "", pos) } +func newAssign(pos int) Token { return newToken(lang.Assign, "", pos) } -- cgit v1.2.3