Add TextWriter, IOException, per-VM module data and pre-load imports; Add console module with Console class

This commit is contained in:
2026-11-23 18:36:46 +01:00
parent 2243557bf5
commit 4d06edd045
55 changed files with 1679 additions and 675 deletions
+5 -4
View File
@@ -1,18 +1,19 @@
import 'console';
class Program {
public void main() {
int $a = 1;
switch($a) {
case 0:
print("very bad\n");
Console::Print("very bad\n");
break;
case 1:
print("very good\n");
Console::Print("very good\n");
case 2:
print("good\n");
Console::Print("good\n");
break;
default:
print("bad");
Console::Print("bad");
break;
}
}