1
0
mirror of https://github.com/vlang/v.git synced 2023-08-10 21:13:21 +03:00

vfmt: support for vid like projects having many module main .v files

This commit is contained in:
Delyan Angelov
2020-01-11 00:33:35 +02:00
committed by Alexander Medvednikov
parent 5537b09492
commit 06f581e146
2 changed files with 67 additions and 3 deletions

View File

@@ -37,6 +37,12 @@ fn (p mut Parser) string_expr() {
p.gen('tos3("$f")')
}
p.next()
if p.scanner.is_fmt && p.tok == .not {
// handle '$age'!
// TODO remove this hack, do this automatically
p.fgen(' ')
p.check(.not)
}
return
}
$if js {
@@ -131,6 +137,7 @@ fn (p mut Parser) string_expr() {
if complex_inter {
p.fgen('}')
}
// p.fgen('\'')
// println("hello %d", num) optimization.
if p.cgen.nogen {
@@ -149,6 +156,7 @@ fn (p mut Parser) string_expr() {
// won't be used again)
// TODO remove this hack, do this automatically
if p.tok == .not {
p.fgen(' ')
p.check(.not)
p.gen('_STR_TMP($format$args)')
}