mirror of
https://github.com/vlang/v.git
synced 2025-09-14 06:52:36 +03:00
parser: print backtrace only in debug mode
This commit is contained in:
parent
0a6840b6a6
commit
f8d14a216b
2 changed files with 3 additions and 10 deletions
|
@ -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)
|
||||
}
|
||||
/*
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue