From ef11656e478c4d15c872b57534a28dd6e59c5e0d Mon Sep 17 00:00:00 2001 From: Eduard Urbach Date: Tue, 11 Jun 2024 23:54:19 +0200 Subject: [PATCH] Removed outdated code --- src/build/output/Compiler.go | 27 --------------------------- 1 file changed, 27 deletions(-) delete mode 100644 src/build/output/Compiler.go diff --git a/src/build/output/Compiler.go b/src/build/output/Compiler.go deleted file mode 100644 index dbbff06..0000000 --- a/src/build/output/Compiler.go +++ /dev/null @@ -1,27 +0,0 @@ -package output - -import ( - "fmt" - - "git.akyoto.dev/cli/q/src/build" - "git.akyoto.dev/cli/q/src/build/token" -) - -// Compiler implements the arch.Output interface. -type Compiler struct{} - -// Compile turns a function into machine code. -func (c Compiler) Compile(f *build.Function) { - for i, t := range f.Body { - if t.Kind == token.Identifier && t.Text() == "print" { - // message := f.Body[i+2].Bytes - // f.Assembler.MoveRegisterNumber(x64.SyscallNumber, linux.Write) - // f.Assembler.MoveRegisterNumber(x64.SyscallArgs[0], 1) - // f.Assembler.MoveRegisterData(x64.SyscallArgs[1], message) - // f.Assembler.MoveRegisterNumber(x64.SyscallArgs[2], uint64(len(message))) - // f.Assembler.Syscall() - message := f.Body[i+2].Bytes - fmt.Println(message) - } - } -}