This commit is contained in:
nub31
2025-11-05 15:20:45 +01:00
parent 36622755a9
commit d3822bc9b4
9 changed files with 802 additions and 1110 deletions

View File

@@ -2,5 +2,5 @@
set -euo pipefail
nubc main.nub test.nub
clang .build/main.ll .build/test.ll -o .build/out
nubc main.nub
clang .build/main.ll -o .build/out

View File

@@ -2,20 +2,13 @@ module main
extern "puts" func puts(text: ^i8)
struct Test
{
field: u32
struct Test {
test: ^i8 = "test1"
}
extern "main" func main(argc: i64, argv: [?]^i8)
{
let x: ^i8 = "test"
// test
^x^ = "uwu"
puts(x)
}
let x = "test"
func test(test: Test): Test
{
return test
puts(x)
}

View File

@@ -1,8 +0,0 @@
module test
extern "puts" func puts(text: ^i8)
func test()
{
puts("uwu")
}