parser: make codegen generate correct module name (#12929)
parent
cfb814a0e3
commit
2693631643
|
@ -308,7 +308,7 @@ pub fn (mut p Parser) parse() &ast.File {
|
|||
|
||||
// codegen
|
||||
if p.codegen_text.len > 0 && !p.pref.is_fmt {
|
||||
ptext := 'module ' + p.mod.all_after('.') + p.codegen_text
|
||||
ptext := 'module ' + p.mod.all_after_last('.') + p.codegen_text
|
||||
codegen_file := parse_text(ptext, p.file_name, p.table, p.comments_mode, p.pref)
|
||||
stmts << codegen_file.stmts
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue