fix parser tests
parent
093a025ebf
commit
3a7f1db947
2
v2.v
2
v2.v
|
@ -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)
|
||||||
|
|
|
@ -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('========')
|
||||||
|
|
Loading…
Reference in New Issue