parser: fix bug not printing percentages

pull/1161/head
Henrixounez 2019-07-15 14:05:11 +02:00 committed by Alexander Medvednikov
parent 916b13b286
commit 48c06df5f5
1 changed files with 1 additions and 0 deletions

View File

@ -2222,6 +2222,7 @@ fn (p mut Parser) string_expr() {
mut format := '"'
for p.tok == .strtoken {
// Add the string between %d's
p.lit = p.lit.replace('%', '%%')
format += format_str(p.lit)
p.next()// skip $
if p.tok != .dollar {