* The new @if directive.
This commit is contained in:
Christoffer Lerno
2023-06-10 23:16:28 +02:00
committed by GitHub
parent 82c3facb65
commit 4c1edfb941
102 changed files with 1272 additions and 1720 deletions

View File

@@ -1,14 +1,9 @@
module hello_world;
import std;
import bar;
$if env::os_is_win32():
fn int test_doubler(int x)
{
return x * x;
}
$else
extern fn int test_doubler(int);
$endif
fn int test_doubler(int x) @if(env::WIN32) => x * x;
extern fn int test_doubler(int) @if(!env::WIN32);
extern fn void printf(char *, ...);
fn int main()