Enough interpreter to do math on constant integers

This commit is contained in:
Nathan Braswell
2016-05-13 03:10:36 -04:00
parent 3fe72bc8e2
commit e63b7cf770
6 changed files with 160 additions and 9 deletions

View File

@@ -8,7 +8,7 @@ import symbol:*
import tree:*
import serialize:*
import c_generator:*
/*import interpreter:**/
import interpreter:*
import os:*
import compiler_version
@@ -78,8 +78,8 @@ fun main(argc: int, argv: **char):int {
importer.import(kraken_file_name)
if (interpret_instead) {
println("Interpreting!")
/*var interpret.construct(importer.name_ast_map, importer.ast_pass.ast_to_syntax): interpreter*/
/*interpret.call_main()*/
var interpret.construct(importer.name_ast_map, importer.ast_pass.ast_to_syntax): interpreter
interpret.call_main()
} else {
println("Generating C")
var c_generator.construct(): c_generator