fix parser tests

pull/3280/head
Alexander Medvednikov 2019-12-30 17:05:32 +01:00
parent 093a025ebf
commit 3a7f1db947
2 changed files with 3 additions and 3 deletions

2
v2.v
View File

@ -23,7 +23,7 @@ fn main() {
text := os.read_file(path)? text := os.read_file(path)?
table := &table.Table{} table := &table.Table{}
program := parser.parse_file(text, table) program := parser.parse_file(text, table)
res := gen.cgen(program) res := gen.cgen([program])
mut out := os.create('out.c')? mut out := os.create('out.c')?
out.writeln(cdefs) out.writeln(cdefs)
out.writeln(res) out.writeln(res)

View File

@ -23,7 +23,7 @@ x := 10
' '
table := &table.Table{} table := &table.Table{}
prog := parse_file(s, table) prog := parse_file(s, table)
res := gen.cgen(prog) res := gen.cgen([prog])
println(res) println(res)
} }
@ -79,7 +79,7 @@ fn test_parse_expr() {
program := ast.File{ program := ast.File{
stmts: e stmts: e
} }
res := gen.cgen(program) res := gen.cgen([program])
println('========') println('========')
println(res) println(res)
println('========') println('========')