feat: add Stdin class with readLine and async stdin read support in io module

This commit is contained in:
Bob Nystrom
2015-10-17 04:05:24 +00:00
parent 6f67fda56a
commit 9e6f778147
12 changed files with 263 additions and 16 deletions
+11
View File
@@ -0,0 +1,11 @@
import "io" for Stdin
System.write("> ")
System.print("1 " + Stdin.readLine())
System.write("> ")
System.print("2 " + Stdin.readLine())
// stdin: first
// stdin: second
// expect: > 1 first
// expect: > 2 second