mirror of
https://github.com/Ed94/Odin.git
synced 2026-07-25 08:57:55 +00:00
Correctly generate LLVM types from Odin types.
This commit is contained in:
@@ -3,9 +3,28 @@ package demo
|
||||
import "core:os"
|
||||
|
||||
main :: proc() {
|
||||
x := 1;
|
||||
y := 2;
|
||||
Foo :: struct {
|
||||
x, y: int,
|
||||
};
|
||||
|
||||
x := i32(1);
|
||||
y := i32(2);
|
||||
z := x + y;
|
||||
w := z - 2;
|
||||
|
||||
|
||||
c := 1 + 2i;
|
||||
q := 1 + 2i + 3j + 4k;
|
||||
|
||||
s := "Hellope";
|
||||
|
||||
f: Foo;
|
||||
pc: proc "contextless" (x: i32) -> Foo;
|
||||
po: proc "odin" (x: i32) -> Foo;
|
||||
e: enum{A, B, C};
|
||||
u: union{i32, bool};
|
||||
u1: union{i32};
|
||||
um: union #maybe {^int};
|
||||
|
||||
// os.write_string(os.stdout, "Hellope\n");
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user