Improved project structure

This commit is contained in:
Eduard Urbach 2023-10-20 17:07:44 +02:00
parent 886ea27d54
commit 61af142930
Signed by: akyoto
GPG Key ID: C874F672B1AF20C0
18 changed files with 33 additions and 15 deletions

View File

@ -4,9 +4,8 @@ A simple programming language.
## Features ## Features
* Fast compilation * 🔥 Fast compilation
* High performance * 📦 Small binaries
* Small binaries
## Installation ## Installation

View File

@ -0,0 +1,19 @@
import sys
main() {
let f = fibonacci(11)
sys.exit(f)
}
fibonacci(n Int) -> Int {
mut b = 0
mut c = 1
for 0..n {
let a = b
b = c
c = a + b
}
return b
}

View File

@ -1,3 +1,3 @@
main() { main() {
print("Hello")
} }

View File

@ -3,7 +3,7 @@ package main
import ( import (
"os" "os"
"git.akyoto.dev/cli/q/cli" "git.akyoto.dev/cli/q/src/cli"
) )
func main() { func main() {

View File

@ -7,10 +7,10 @@ import (
"path/filepath" "path/filepath"
"strings" "strings"
"git.akyoto.dev/cli/q/directory" "git.akyoto.dev/cli/q/src/directory"
"git.akyoto.dev/cli/q/elf" "git.akyoto.dev/cli/q/src/elf"
"git.akyoto.dev/cli/q/errors" "git.akyoto.dev/cli/q/src/errors"
"git.akyoto.dev/cli/q/log" "git.akyoto.dev/cli/q/src/log"
) )
// Build describes a compiler build. // Build describes a compiler build.

View File

@ -1,8 +1,8 @@
package cli package cli
import ( import (
"git.akyoto.dev/cli/q/build" "git.akyoto.dev/cli/q/src/build"
"git.akyoto.dev/cli/q/log" "git.akyoto.dev/cli/q/src/log"
) )
// Build builds an executable. // Build builds an executable.

View File

@ -1,7 +1,7 @@
package cli package cli
import ( import (
"git.akyoto.dev/cli/q/log" "git.akyoto.dev/cli/q/src/log"
) )
// Help shows the command line argument usage. // Help shows the command line argument usage.

View File

@ -4,7 +4,7 @@ import (
"os" "os"
"runtime" "runtime"
"git.akyoto.dev/cli/q/log" "git.akyoto.dev/cli/q/src/log"
) )
// System shows system information. // System shows system information.

View File

@ -5,8 +5,8 @@ import (
"os" "os"
"testing" "testing"
"git.akyoto.dev/cli/q/cli" "git.akyoto.dev/cli/q/src/cli"
"git.akyoto.dev/cli/q/log" "git.akyoto.dev/cli/q/src/log"
"git.akyoto.dev/go/assert" "git.akyoto.dev/go/assert"
) )