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

parser: print backtrace only in debug mode

This commit is contained in:
Alexander Medvednikov
2019-11-05 02:30:51 +03:00
parent 0a6840b6a6
commit f8d14a216b
2 changed files with 3 additions and 10 deletions

View File

@@ -717,7 +717,9 @@ fn (p mut Parser) check(expected TokenKind) {
s := 'expected `${expected.str()}` but got `${p.strtok()}`'
p.next()
println('next token = `${p.strtok()}`')
print_backtrace()
if p.pref.is_debug {
print_backtrace()
}
p.error(s)
}
/*