Skip to content

Commit

Permalink
rewriter Testable.vein
Browse files Browse the repository at this point in the history
  • Loading branch information
0xF6 committed Jun 26, 2024
1 parent 903cace commit 29f248b
Show file tree
Hide file tree
Showing 2 changed files with 21 additions and 13 deletions.
15 changes: 4 additions & 11 deletions lib/vein.std/std/Out.vein
Original file line number Diff line number Diff line change
@@ -1,17 +1,10 @@
#space "std"


public static class Out
{
[native("__internal__", "@_println")]
public extern static @_println(value: Object): Void;
[native("__internal__", "@_println")]
public extern static @_println(value: i32): Void;

public static print(value: string): Void
|> Out.@_println(value);

public static print(value: i32): Void
|> Out.@_println(value);
}
public extern static _println(value: Object): Void;

public static print<Any>(value: Any): Void
|> Out._println(value);
}
19 changes: 17 additions & 2 deletions lib/vein.std/std/Testable.vein
Original file line number Diff line number Diff line change
@@ -1,16 +1,31 @@
#space "std"


public class Testable
{
public static master(): Void
{
Out.print("yamete...");


aboba(1, "test string");

abobus(delMethod);
}


public static delMethod(i: i32): Void {
Out.print("yamete...");
}

public static aboba<T, E>(t: T, b: E): Void {
Out.print("yamete...");
Out.print(t);
Out.print(b);
}
}

public static abobus(fn: testMethod): Void {
fn(255);
}
}

global alias testMethod(i: i32): Void;

0 comments on commit 29f248b

Please sign in to comment.