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

parser: fix v test-parser examples/cli.v (#7243)

This commit is contained in:
Daniel Däschle
2020-12-10 18:32:15 +01:00
committed by GitHub
parent 1c56ff7faf
commit aedd1d17b8
5 changed files with 5 additions and 15 deletions

View File

@ -140,13 +140,6 @@ fn yellow(msg string) string {
return term.yellow(msg)
}
fn italic(msg string) string {
if !support_color {
return msg
}
return term.italic(msg)
}
fn (mut context Context) log(msg string) {
if context.is_verbose {
label := yellow('info')
@ -219,7 +212,7 @@ fn (mut context Context) process_whole_file_in_worker(path string) (int, int) {
col := last_line.len
err := if is_panic { red('parser failure: panic') } else { red('parser failure: crash, ${ecode_details[res.exit_code.str()]}') }
path_to_line := bold('$path:$line:$col:')
err_line := italic(last_line.trim_left('\t'))
err_line := last_line.trim_left('\t')
println('$path_to_line $err')
println('\t$line | $err_line')
println('')