Finished step 1
This commit is contained in:
1 parent
5b5832e475
commit
97f047e10a
4 files changed
+261
-9
No files matched your search
+2
-9
@@ -1,3 +1,5 @@
|
||||
import {readUserInputs} from "./src/shared.ts";
|
||||
|
||||
function read(source: string): string {
|
||||
return source;
|
||||
}
|
||||
@@ -14,15 +16,6 @@ function rep(source: string): string{
|
||||
return print(eval_(read( source)))
|
||||
}
|
||||
|
||||
function* readUserInputs(): Generator<string>{
|
||||
while(true){
|
||||
const u = prompt("user> ")
|
||||
if(u === null){
|
||||
return
|
||||
}
|
||||
yield u
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
function main(): void {
|
||||
|
||||
Reference in new issue
Block a user