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

scanner: use formatted errors for s.error too

This commit is contained in:
Delyan Angelov 2020-04-06 19:58:21 +03:00
parent 5be892c635
commit 3b3d248637

View File

@ -1016,7 +1016,11 @@ fn good_type_name(s string) bool {
}
pub fn (s &Scanner) error(msg string) {
println('$s.line_nr : $msg')
pos := token.Position{
line_nr: s.line_nr
pos: s.pos
}
eprintln(util.formated_error('error', msg, s.file_path, pos))
exit(1)
}