tests: fix compilation of parser_test.v
parent
ef19aa1de6
commit
c00ec77737
|
@ -41,7 +41,7 @@ const (
|
|||
'vlib/regex/regex_test.v',
|
||||
'vlib/sqlite/sqlite_test.v', // Linux only
|
||||
'vlib/strconv/ftoa/f32_f64_to_string_test.v',
|
||||
'vlib/v/parser/parser_test.v',
|
||||
//'vlib/v/parser/parser_test.v', // exits early, but it should compile
|
||||
'vlib/v/tests/array_to_string_test.v',
|
||||
'vlib/v/tests/asm_test.v', // Linux only
|
||||
'vlib/v/tests/backtrace_test.v', // TCC only
|
||||
|
|
|
@ -79,7 +79,8 @@ x := 10
|
|||
'
|
||||
table := &table.Table{}
|
||||
vpref := &pref.Preferences{}
|
||||
prog := parse_file(s, table, .skip_comments, vpref)
|
||||
gscope := &ast.Scope{ parent: 0 }
|
||||
prog := parse_file(s, table, .skip_comments, vpref, gscope)
|
||||
mut checker := checker.new_checker(table, vpref)
|
||||
checker.check(prog)
|
||||
res := gen.cgen([prog], table, vpref)
|
||||
|
@ -111,6 +112,7 @@ fn test_one() {
|
|||
program := ast.File{
|
||||
stmts: e
|
||||
scope: scope
|
||||
global_scope: scope
|
||||
}
|
||||
mut checker := checker.new_checker(table, vpref)
|
||||
checker.check(program)
|
||||
|
@ -209,6 +211,7 @@ fn test_parse_expr() {
|
|||
program := ast.File{
|
||||
stmts: e
|
||||
scope: scope
|
||||
global_scope: scope
|
||||
}
|
||||
checker.check(program)
|
||||
res := gen.cgen([program], table, vpref).after('#endif')
|
||||
|
|
Loading…
Reference in New Issue