compiler: proper line numbers in debuggers (fixes regression after 207bab5).

pull/1465/head
Delyan Angelov 2019-08-04 12:00:56 +03:00 committed by Alexander Medvednikov
parent 4bc1f73fd0
commit 9a3570a5b3
1 changed files with 1 additions and 0 deletions

View File

@ -37,6 +37,7 @@ fn (p mut Parser) fgenln(s string) {
fn (p mut Parser) peek() Token { fn (p mut Parser) peek() Token {
for { for {
p.cgen.line = p.scanner.line_nr + 1
tok := p.scanner.peek() tok := p.scanner.peek()
if tok != .nl { if tok != .nl {
return tok return tok