summaryrefslogtreecommitdiff
path: root/parser/tokens.go
diff options
context:
space:
mode:
authorMarc Vertes <mvertes@free.fr>2026-01-24 23:06:55 +0100
committerMarc Vertes <mvertes@free.fr>2026-01-24 23:06:55 +0100
commit95c50e35888fb54ced38907dc6e97dc683937e70 (patch)
treefd68ffe15104f0c94700648c6893ed90a3d32423 /parser/tokens.go
parent51e11a29f9d2a9e571c3ea7c406863a025749ad6 (diff)
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.
Diffstat (limited to 'parser/tokens.go')
-rw-r--r--parser/tokens.go1
1 files changed, 1 insertions, 0 deletions
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) }