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

cgen: lots of fixes

This commit is contained in:
Alexander Medvednikov
2020-03-15 00:46:08 +01:00
parent 50ed4004f4
commit 843bb6dac1
15 changed files with 107 additions and 79 deletions

View File

@ -52,7 +52,7 @@ fn (p mut Parser) string_expr() {
mut args := '"'
mut format := '"'
mut complex_inter := false // for vfmt
for p.tok == .str {
for p.tok == .string{
// Add the string between %d's
p.lit = p.lit.replace('%', '%%')
format += format_str(p.lit)
@ -64,7 +64,7 @@ fn (p mut Parser) string_expr() {
p.check(.str_dollar)
// If there's no string after current token, it means we are in
// a complex expression (`${...}`)
if p.peek() != .str {
if p.peek() != .string{
p.fgen('{')
complex_inter = true
}