compiler: produce errors in C "filepath:line:column:" format

This commit is contained in:
Delyan Angelov 2019-08-22 14:15:11 +03:00 committed by Alexander Medvednikov
parent 9b3b22d6b3
commit 77b31de117
5 changed files with 47 additions and 10 deletions

View file

@ -1,3 +1,3 @@
println(a)
===output===
.vrepl.v:2 undefined: `a`
.vrepl.v:2:9: undefined: `a`

View file

@ -1,5 +1,5 @@
a
33
===output===
.vrepl_temp.v:2 undefined: `a`
.vrepl_temp.v:2:9: undefined: `a`
33

View file

@ -2,7 +2,7 @@ import os
fn test_repl() {
test_files := os.walk_ext('.', '.repl')
wd := os.getwd() + '/'
for file in test_files {
content := os.read_file(file) or {
assert false
@ -19,7 +19,7 @@ fn test_repl() {
assert false
break
}
result := r.output.replace('>>> ', '').replace('>>>', '').replace('... ', '').all_after('Use Ctrl-C or `exit` to exit\n')
result := r.output.replace('>>> ', '').replace('>>>', '').replace('... ', '').all_after('Use Ctrl-C or `exit` to exit\n').replace( wd, '' )
assert result == output
if result != output {
println(file)
@ -27,4 +27,4 @@ fn test_repl() {
println('Expected : $output')
}
}
}
}