From 0063922f5c8a07b78603b2da7f6a3c2094711c3d Mon Sep 17 00:00:00 2001 From: Marc Vertes Date: Tue, 23 Apr 2024 14:36:57 +0200 Subject: feat: initial and partial support of composite expressions (#9) A new `Composite` token is created. Literal composite expressions are recognized and partially handled by the parser but not yet by the code generator. Other cosmetic changes are present. --- parser/compiler.go | 3 +++ 1 file changed, 3 insertions(+) (limited to 'parser/compiler.go') diff --git a/parser/compiler.go b/parser/compiler.go index 7a90597..3b9a32d 100644 --- a/parser/compiler.go +++ b/parser/compiler.go @@ -134,6 +134,9 @@ func (c *Compiler) Codegen(tokens Tokens) (err error) { } emit(int64(t.Pos), vm.CallX, int64(t.Beg)) + case lang.Composite: + log.Println("COMPOSITE") + case lang.Grow: emit(int64(t.Pos), vm.Grow, int64(t.Beg)) -- cgit v1.2.3