mirror of
https://github.com/vlang/v.git
synced 2023-08-10 21:13:21 +03:00
parser: make codegen generate correct module name (#12929)
This commit is contained in:
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
Block a user