equal
deleted
inserted
replaced
278 |
278 |
279 //compile_run(Stmts.parse_all(tokenise(os.read(os.pwd / "collatz2.while"))).head, "collatz2") |
279 //compile_run(Stmts.parse_all(tokenise(os.read(os.pwd / "collatz2.while"))).head, "collatz2") |
280 |
280 |
281 |
281 |
282 println(tokenise(os.read(os.pwd / "forloop.while"))) |
282 println(tokenise(os.read(os.pwd / "forloop.while"))) |
283 compile_run(Stmts.parse_all(tokenise(os.read(os.pwd / "forloop.while"))).head, "forloop") |
283 compile_all(Stmts.parse_all(tokenise(os.read(os.pwd / "forloop.while"))).head, "forloop") |
|
284 |
|
285 |
|
286 |
|
287 // for automated testing |
|
288 |
|
289 @main |
|
290 def main(file: String) = { |
|
291 // empty - nothing to run |
|
292 } |
|
293 |
|
294 @main |
|
295 def test(file: String) = { |
|
296 val contents = os.read(os.pwd / file) |
|
297 val class_name = file.stripSuffix(".") |
|
298 compile_all(Stmts.parse_all(tokenise(os.read(os.pwd / file))).head, class_name) |
|
299 tokenise(contents) |
|
300 } |
|
301 |
|
302 |